I have been trying to generate unique ID’s and it has intermittent issues, but I just realised that Glide has implemented an incrementer.
Before I switch it on, I just wanted to understand something.
Currently when I submit (using the submit in the top right) it adds in the column, but if I activate the “On Submit” (which is currently set to none) and select increment number. Is it that there are two actions.
Add row like it is doing normally
and then a second action defined by submit
Forms add rows on their own as that is their purpose. So adding an Add Row action On Submit would be redundant if you are adding the same info to the same table.
On Submit is for any actions you want to run AFTER the row is added. So, yes, it is a separate action to the form’s built in add row action.
Just be careful with On Submit. Things run very fast, so there can be times where a row doesn’t fully exist yet when the On Submit actions run, so it may not always work as expected. It all depends on what you are trying to do.
Regarding the increment action, I don’t know if I would use that when adding a row for the above reasons I assume you would always be defaulting it to 1, so I would either add a component that pulls the value of 1 from an existing column, such as a user profile column, or create a hidden number entry component with a default value set to 1. It will save on updates and also be more reliable.
Although I didn’t study your implementation in detail, the general approach seemed quite sound to me, and I would have thought it should work.
How were you setting the JobID?
If you were doing it as an onSubmit action, then I’m not surprised it didn’t work reliably.
But if you were to pass it with the form as a User Profile value, then I’d expect it to be a pretty solid solution.