Virtual Collumn calculating different during edit and sync

Hello!

Have you guys had problem with virtual collumns calculating the result different when editing the collumn than when syncing? Usually when working with math and duration.

I’ve noticed this before, but this now my problem is: I have a worktime table and I want to calculate the totalseconds worked before 5am or after 10pm. I’ve tested Expressions 1 and then changed it to Expression 2, that works just fine (see below).

I guess it was a formatting issue, but what is bugging me is that Expression 1 gives the right result on editor testing and also when app syncing. But when editing the row (even an unrelated field) and recalculates the Virtual Collumn, it gives a completely different result.

EXPRESSION 1

TOTALSECONDS(
MIN(LIST(“05:00:00”,[End_time])) - MIN(LIST(“05:00:00”,[Start_time]))
+
MAX(LIST(“22:00:00”,[End_time])) - MAX(LIST(“22:00:00”,[Start_time]))
)

EXPRESSION 2

TOTALSECONDS(MIN(LIST(“05:00:00”,[End_time])) - MIN(LIST(“05:00:00”,[Start_time])))
+
TOTALSECONDS(MAX(LIST(“22:00:00”,[End_time])) - MAX(LIST(“22:00:00”,[Start_time])))

There are known differences in the way the way the editor, the app, and the server evaluate and sometimes misevaluate expressions. I encourage you to engage support@appsheet.com directly for help finding the breakdown here.

1 Like