I have an “On Submit” action that does lots of housekeeping based on the ‘submit’.
In a handful of cases I ‘update’ the table used for the submit (clearing a temporary variable).
Everything works as expected EXCEPT when I set-col-val the ‘submit table/row’ to clear a variable. The submit fails. I removed the set-col-val and everything works.
How does On Submit work? What are the rules of thumb? For example - NEVER update the ‘submit’ row even if you are updating hidden values.
As a rule of thumb, it’s good if the data being treated in the on-submit is different than data being treated in associated the custom action.
For example, if the custom action includes an add row and the on-submit include an set column value of that row (possibly what you are doing), then it is possible that set-col-val is triggering even before the new row has been added.
What you can try: in your on-submit, before you set-col-val, include a wait action of 1-3 seconds. That might help. But it does go against the rule of thumb.
I might be the minority, but I almost never experience issues with Form Submit → On Submit Action → Set Column Value. It’s a fantastic feature that I use in nearly every app.
Maybe not exactly the same scenario, but I’ve ran into issues deleting rows through a relation as part of a custom action… if the relation is empty and there is nothing to delete, then the rest of the action chain fails, so I 've had to use multiple conditions with duplicates actions to account for those scenarios.
Pretty much what happened to me with set col vals in another use case. Worked perfectly in Classic (when it would just continue to flow past the failure) - then not working now. It was a subtle use case which I didn’t notice until…well…I did during a demo. The disappearing button has also occurred where I needed to add more branches (which I did) which seemed weird but now makes sense. Probably occurred cause I followed your philosophy/methodology
A year ago I had about a 2% failure rate of my form submit >on submit >set column action when I was setting columns on the data submitted in the native form.
I stopped using the combination last year. Since then, I have only used set column in the on submit for data that isn’t dependent on the form’s submission, or I’ve used a custom form.
Are you setting columns on data that was just submitted in the form?
My On Submit did Add Rows on tables not part of the Submit (creating messages for team members) and then did a Set Col Val on the row that was “Submitted” (using an Edit Screen). The idea was to clear some temporary data in ‘hidden variables’ in the row.
The Set Col Val on “This item” caused the ‘Edit Screen’ updates to fail. I removed it and everything worked as it should. And the Glide Docs return ‘empty’ when searching for ‘On Submit’ so I figured I would query the Community.