I'm trying to debug a fairly complicated Date...

ux
(Simon Robinson) #1

I’m trying to debug a fairly complicated DateTime formula.

But finding it impossible due to the way Appsheet handles virtual columns.

I’m getting totally different answers depending on whether I look at them in the Detail view or Form view.

When I click on TEST for the formula it seems to match the Detail view.

Also, I’m not certain, but it looks like some of the Detail view columns are reading the Form view columns and vice-versa

I have a VC called [Est Time] with the following formula: TIME(“09:00:00”+[Time on Last Day]) = 18:26:57 where [Time on last day]=“01:26:58” and is a DURATION.

So its wrong as the result should be 10:26:58

I even tried TIME(TIME(“09:00:00”)+[Time on Last Day]) but the result is the same

Yet in Form view, the answer is correct, “10:26:xx”

Weirder still, I also calculate [Est Date].

This is correct in the Detail view and wrong in the Form view.

The opposite of the above :confused:

Any ideas?

(Steven Coile) #2

I, too, have noticed significant problems with inconsistent time handling. Please report this to support@appsheet.com.

(Simon Robinson) #3

Done

(Reza Raoofi) #4

I think adding/subtracting duration in such scenarios works best with DateTime column type; I tested this and returned the expected result (10:26:58) where [Time on last day]=“01:26:58”:

TIME(DATETIME(“09:00:00”)+[Time on last day])

(Simon Robinson) #5

@RezaRaoofi thats interesting.

Sounds like a bug.

#6

Probably there are one or more bugs in either the date arithmetic itself or the type inference system. For example you said ‘where [Time on last day]=“01:26:58” and is a DURATION’, but AppSheet tries to distinguish duration from time by using 3 leading digits, e.g. “001:26:58” so some part of the process may be interpreting that as a time.

The reason you see inconsistency between the form and detail views would be that the form recomputes its virtual columns within the app when it opens, while the detail view shows the result that was computed on the server during sync. So it points to some inconsistency in the client and server expression systems. I’ll see if I can find where that’s occurring.

#7

I tried setting up the EstTime scenario in one of my apps and I’m only seeing 10:26:58AM in either view. We might need to actually look at the app to see what’s going on in your case. You can email support@appsheet.com with app name, account number and instructions to reach the relevant views in the app if you’d like us to look at it.