Are expressions recalculated in data change?

I have the following expression for the column 'Invoice Hours'

TOTALHOURS(TIME([Date/Time end]) - TIME([Date/Time start])) - TOTALHOURS([float end] -[float start]) - TOTALHOURS([Maintenance end] - [Maintenance start]) - [Location].[Smoko] -[Location].[Lunch]

The data for this record is added at 2 different timestamps of the day. The items in red are only added in the afternoon whereas the other data is added in the morning. I notice this as Invoice Hours is not correctly calculated.

So here's the question. It appears that 'Invoice Hours' doesn't get recalculated after the items in red are available. Is that correct? If so can I automatically force a recalculation or stop the calculation for 'Invoice Hours' in the morning when the data in red is not yet available?

0 5 138
5 REPLIES 5

Any regular (non virtual) columns with an App Formula requires editing of itself (any column(s) belonging to its row) to be recalculated.

Not sure I understand. Yes, it's not a virtual column. So how do I recalculate

You can create a column of type number which just increments by one by a bot that is triggered when related changes occur. This changes/edits the row forcing recalculation of its App Formula.

I assume "Invoice Hours" is a datasource column and not a Virtual Column. 

Than answer to your question depends on WHERE you have placed the expression.

If you have placed the expression in the App Formula of the "Invoice Hours" column, it should automatically recalculate anytime the row is changed - i.e. anytime the red columns have been updated.

If you have placed the expression in the Initial Value property, it will only execuce whent he row is created - i.e. new row.  HOWEVER, you can force it to recalculate by turning on the "Reset on Edit" property.    You only want this expression in Initial Value IF you need to allow manual override of vlaue by a user.  If you don't then move it to App Formula and you should be all set.

I hope this helps!


Yes, 'Invoice Hours' is in the datasource and yes the expression is in the App Formula

tfmeier_0-1714566550960.png

but it doesn't get recalculated

Top Labels in this Space