Automatically change a form field value immediately after user changes another field

Hi all,

I have an appsheet form on which I need a field to be reset to the initial value immediately when the user changes the value of another field.  This must happen immediately, not when the row is saved, so I can't rely on the _THISROW_BEFORE <> _THISROW_AFTER test.  

Any suggestions much appreciated.

Dave

Solved Solved
0 8 161
1 ACCEPTED SOLUTION

Put an Editable_If formula on your field A.  ISBLANK([_THIS])

What this will do is LOCK in the value set in A on the form.  If the user wants to change the value of A, they will need to cancel the form and open it again.

It forces the user to take time on choosing the initial selector field and then you can present a list of choices for field B or something like that.

It's just a suggestion 😊

View solution in original post

8 REPLIES 8

You can do that with the "Reset on edit" option as you can use a formula with it. You can find it from that column's defenitions.

Is there a formula that will be triggered immediately by the user updating the column?

Using _THISROW_BEFORE.my_column <> _THISROW_AFTER.my_column only works once, and only if the new value is different from the original/initial value.

I need this behaviour triggered every time the user changes the value, even if it's multiple times between saves, and back-and-forth to the same values.  It is critical that I reset the value of this other column when that occurs.

Does that field need to be editable?

Yes.  Field B is defaulted to a value using field A to look up that default value from another table.  The user can edit field B, but if they change field A after that, I must have the value reset to the new default value.

Unfortunately the "Reset on Edit" updates only once within the same form open event.

Ok, thanks for responding Aleksi.

Put an Editable_If formula on your field A.  ISBLANK([_THIS])

What this will do is LOCK in the value set in A on the form.  If the user wants to change the value of A, they will need to cancel the form and open it again.

It forces the user to take time on choosing the initial selector field and then you can present a list of choices for field B or something like that.

It's just a suggestion 😊

That is a great suggestion.  Not what I hoped for, but it does allow me to prevent mistakes with very unfortunate outcomes.  Thanks @scott192 

Top Labels in this Space