Hello AppSheet Community,
I have a parent table โincidentsโ that has a one:many relationship with the child table โactions.โ The incidents table has a status field. The actions table has a actType field. I want the status field to be โClosedโ if any related actType field has the value โyesโ and โOpenโ otherwise.
I use this formula for the status field in the incidents table:
IF(IN(โYesโ,[Related actions][actType]),โClosedโ,โOpenโ)
If I create a closing action WHILE Iโm creating a new incident this formula seems to work. However, if I create a new incident, save it, and then later add a closing action then the status column does not update.
Iโm guessing the [Status] column is a real column? As a real column, it will only update when the record it is in is updated. If you make it a Virtual Column, it will update upon every sync.
Yes, I have it as a real column. That makes sense. I think I do want to save that information as a real column too. Is there anyway to have a real column auto-update whenever I add a new action?
There is. It is a bit more advanced (but not too much).
You simply need to trigger an edit (any edit) in a record in order to force all real column expressions to recalculate.
One way (of many), is to create a hidden column in the Incidents table, of DateTime type. Create an action (action A) that sets the value of this column to UTCNOW().
You need to run this action A upon making any edits to Action records, or creating new ones.
One way to do this is to create another action (action B) for the Actions table, of type โexecute action on set of rowsโ and point it to your Incidents table, the parent Incident record (as a list), and action A.
Then you set action B as the Form-Saved Behavior for the actions_Form UX view.
Interesting. Thanks Marc_Dillon!
User | Count |
---|---|
35 | |
35 | |
28 | |
23 | |
18 |