SWITCH and CONTEXT formula resets results on save

My love / hate relationship with AppSheet continues today, with another seemingly simple update which proves to be irritatingly time consuming to nail. Your help is appreciated.

Table: WAITING_LIST
View: All Waiting Lists
Column: _waitingSince_display
App formula: PIC3

SWITCH(
CONTEXT("View"),
"All Waiting Lists",[_daysWaiting]&" days",
TEXT([memberStarted],"dd/mm/yyyy")&" ("&[_daysWaiting]&" days"&")"
)

Behaviour / problem:
When I click SAVE in the App formula dialog, the view updates as I expect to show the “All Waiting Lists” text as detailed. PIC1. However, immediately I save the App the view reverts to the SWITCH default text, NOT the “All Waiting Lists” text. PIC2

What’s happening here? How do I prevent / fix my SWITCH to work as expected?

Yours in puzzlement.
G.


PIC1


PIC2

PIC3

I think what is happening is, you are setting the CONTEXT(“View”) as a dependent on table view but when you are saving in the app editor the corresponding rows in the table views are NOT changed.

If you include a data change inline action in the table view and change any other column in the table view, I believe you will see that the [_waitingSlice-Display] column will also change to respect the expression.

I think bottom line is, for the expression to work in a real column, the row should be edited in form view or the row should edit with action/bot etc.

Please take a look at the below excerpt from the relevant help article.

Define app formulas and initial values - AppSheet Help

Edit: As an alternative, you could have a VC called say [_waitingSlice_Display_V ]with an app formula expression something like

[_daysWaiting]&" days"

The show_if of this column can be

CONTEXT("View’)= “All Waiting Lists”

Please include this VC in the table view.

Now, the show_if for the real column [_waitingSlice_Display] can be

CONTEXT("View’)<> “All Waiting Lists” and its app formula can be

TEXT([memberStarted],“dd/mm/yyyy”)&" (“&[_daysWaiting]&” days"&“)”

Please include this column in the desired views except the table view.