Q: Is it possible to dynamically swap weight entry field between LBS and KG?
I am trying to get a column backed text entry field for weight to dynamically swap between displaying, accepting and normalizing weight entries โฆ past and present. I have a global weight units setting (LBS / KG) stored in a separate table column. I want to drive the weight_kg entry to dynamically change to whichever global setting was just applied. I am hoping for pseudo code like this to dynamically drive the [weight_value]
text entry field (and redisplay when [global_units]
changes) โฆ
[weight_value]=IF([global_units]="LBS",[weight_kg]*2.2,[weight_kg])
โฆ and pseudo code like this on entry processing โฆ
[weight_kg]=IF([global_units]="LBS",[weight_value]/2.2,[weight_kg])
I canโt think of how to do this in AppSheet. Hoping to find out if anyone has encountered and addressed this problem before.
Have you considered a virtual column?
Yes, but my understanding is that a user canโt enter data into a virtual column, which is why I didnโt try to pursue this route. If I imagine this in a ReactJS context, Iโd take care of the conversion for display in render()
and handle normalizing the units in a Submit button event handler. Is there something analogous in AppSheet?
I have no experience with ReactJS, but based on a quick googling, Iโd say AppSheet has nothing even close to render().
You can attach actions to the form submission.
That sounds promising. I found this example AppSheet App called Dynamic Form Action. Is this what youโre thinking? Whatโs the AppSheet setting to attach actions to the form submission?
It was staring me in the face! Thanks Steve!
User | Count |
---|---|
38 | |
35 | |
27 | |
23 | |
18 |