How does on submit work

Hi All,
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.

  1. Add row like it is doing normally
    and then a second action defined by submit
  2. increment the number ?

If instead of selecting “increment number” if I select “add row” will it add 2 rows ?

Just trying to understand how this “on submit” works.


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.


I am trying to create a unique JOB Number for each job.

I had a fairly simple implementation of maxjob and nextjob=maxjob+1, but if I had two users go in at the same time they would get the same number.

I then gave each user a prefix and the concat it to the nexjob, but it seems to work intermittently, sometimes it works and sometime it doesn’t leaving the jobID blank

I remember that. This one, yes? :point_down:

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.