AppFormula calculation for physical/virtual columns

My understanding is that AppFormulas for physical columns are ONLY recalculated when the row is updated - is this correct?

Does the same apply for virtual columns or are AppFormulas on virtual columns recalculated on the fly, e.g. when they are used as input for another formula or the result of the formula is used by a view being displayed, even when the row has not been updated?

Hi @SethHamilton

SethHamilton:

My understanding is that AppFormulas for physical columns are ONLY recalculated when the row is updated - is this correct?

Short answer: Almost.
Long answer: To my knowledge, the correct word would be : edited.
If one input value of your expression changes due to any other action (for example “set the values of some columns in this row”), then the calculation won’t be updated.

SethHamilton:

Does the same apply for virtual columns or are AppFormulas on virtual columns recalculated on the fly, e.g. when they are used as input for another formula or the result of the formula is used by a view being displayed, even when the row has not been updated?

Short answer: Almost, again.
Long answer: The difference with physical columns, is that the virtual columns will be recalculated on the fly, indeed.
However, if one input of the expression is based on a physical column, then you may have to wait for it to be written and “sync back” in order to be used as a correct input for your virtual column.

In most case this is quasi-instantaneous, but that may take a few seconds depending on the complexity and dependencies of the expressions you use.
The longest sync I saw was for a quote sum, that I duplicated with 4 levels of parents/children relations and around 40 virtual columns or so in each table ==> complete sync took around 10 secs.

If you are concerned about sync issues for displaying results, I suggest you have a look to this excellent tip:

[Display a "Waiting for sync . . ." message](https://community.appsheet.com/t/display-a-waiting-for-sync-message/18281) Tips & Tricks ?

AppSheet allows us to combine the computing power of Google Sheets and other spreadsheets with that of AppSheet expressions. While it’s generally better not to rely on computations in Google Sheets because it can cause syncing delays and issues, sometimes letting Google Sheets do some calculations in the background is the best way. For example, in the following post, I explain how to make a mirrored histogram using Google Sheets in a way that I don’t think is possible in AppSheet at this point…

To add onto what @Aurelien has said

SethHamilton:

My understanding is that AppFormulas for physical columns are ONLY recalculated when the row is updated - is this correct?

App Formulas are updated when you go into a form and you change/add/delete anything in that form. Also if you have an Bot that runs an action on that row then the App forumula will be recalculated.

SethHamilton:

Does the same apply for virtual columns or are AppFormulas on virtual columns recalculated on the fly, e.g. when they are used as input for another formula or the result of the formula is used by a view being displayed, even when the row has not been updated?

Very annoyingly, Appsheet has 2 completely seperate ways it processes calculating virtual columns. The first is when your in a form and you change something the virtual column recalculated instantly, same as an App formula above.

The second is if you are looking at the same virtual column in a detail view or table. You need to understand that despite this being exactly the same column its calculated by a completely seperate part of Appsheet. This one only updates when you sync.

So its entirely possible to go into a Detail view and see the virtual column say “10”, then edit that record in a Form an see the same virtual forumla say “9”. So you save that record as “9” and go back to the Detail view and the same virtual column in there says “10” still

Simon@1minManager.com

Thanks @Aurelien, that confirms what I thought was happening.

Thanks @1minManager for the extra info.