New Bug Encountered: TOTALHOURS dysfunction

Hi ! (you’re great ) What I have seen:

TOTALHOURS(now()-“1/1/2021”)=6789,40 from a VIEW
and
TOTALHOURS(now()-“1/1/2021”)=6788,81 from its associated FORM !

Many and many trials always have shown the same difference of 59’02" !!
Are computations done in different time zones ?

Solved Solved
2 4 156
1 ACCEPTED SOLUTION

So the way Appsheet calculates virtual columns needs some explaining. You’re seeing two different figures for potentially 2 reasons:

1 = Virtual columns in a Form are calculated immediately based on the known data in the tables and the data contained in the form. As you change the data in the form, the VC will change up to you clicking save. Whereas virtual columns in a detail view are ONLY recalculated when you sync. Yes this is a massive PITA, and its been like it for years…

2 = To further complicate this, apparantly Appsheet has two seperate bits of code for calculating virtual columns. One piece of code for VC’s in a form and the other for VC’s in detail views. So its quite possible, normally due to a bug, to do a sync and then still get different results. To be fair, in my experience, this has been limited to various rounding errors and I haven’t experienced this for quite a while.

This probably won’t help, but may explan why

View solution in original post

4 REPLIES 4

Is this in a virutal column?

Yes, of course. Why not ?
It is not set in the Data source.

So the way Appsheet calculates virtual columns needs some explaining. You’re seeing two different figures for potentially 2 reasons:

1 = Virtual columns in a Form are calculated immediately based on the known data in the tables and the data contained in the form. As you change the data in the form, the VC will change up to you clicking save. Whereas virtual columns in a detail view are ONLY recalculated when you sync. Yes this is a massive PITA, and its been like it for years…

2 = To further complicate this, apparantly Appsheet has two seperate bits of code for calculating virtual columns. One piece of code for VC’s in a form and the other for VC’s in detail views. So its quite possible, normally due to a bug, to do a sync and then still get different results. To be fair, in my experience, this has been limited to various rounding errors and I haven’t experienced this for quite a while.

This probably won’t help, but may explan why

Good ! I can now get around this hassle setting some values in the Data source.

NB: the calculation in the Data source =(now()-“1/1/2021”)*24 gives a 3rd different result ! But this one seams to be the real result.

Top Labels in this Space