CONTEXT("View") Issue in a VC

I encountered an issue regarding the CONTEXT() formula.

I have a view named “AppDesc”.

In a VC, I want it to display a specific text only when the user is in the “AppDesc” view.

I used the following formula:
IF(CONTEXT(“View”)=”App Desc”, “Long calculated text string here”, ““)

I want it to behave such that it will skip the VC calculation when in any other views except for “App Desc” , to improve sync time.

However, when I tested and went to AppDesc view, there’s only BLANK being outputted.
I also tested with a simple non-calculated text string (see below photo) to check if the boolean expression was working, but the output was the FALSE result :sweat_smile:.

Already double-checked the View name.

Not sure if there’s a bug going on with CONTEXT(“View”) at the moment? Can anyone check?

The CONTEXT() expressions do not work with virtual columns.

Please see below in the article CONTEXT() - AppSheet Help

You could possibly have a Y/N column if you wish to control calculation in a detail or summary view and base a toggle action on thyat column to control the heavy calculation. This could be something like

IF([Compute_Flag] , “Your heavy calculation”, “ “)

However this compute flag column will need to be in a User table for multiuser environment. This is so because in multiuser environment one user may want to see the heavy computation and other not.

2 Likes

Thanks for this. I havent read that bit in the documentation.

Thank you. Still wish we had simplified control over this.

@Suvrutt_Gurjar

What about if I monitor the current view by placing the Compute_Flag formula in the Show_If condition for that VC?

Will Appsheet still calculate the heavy formula if Show_if is outputting a FALSE?

Show_if just hides the a column from being shown in a view, not its computation. It will not help in your desired functionality.

1 Like

Noted. Thank you

2 Likes

What is the expression for the virtual column? Maybe there’s room for improvement?

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.