I was wondering whether someone might be able to give me some direction as to how I’d go about getting the last record inserted ID
Basically I have a form that I will be inserting into a table and once its inserted I’m going to add an action to browser -> go.to pageb.php?id=x (x being the record I’ve just inserted on the form) so that I can repopulate the form on pageb.php for review after some calculations have been done.
Hi Ben,
The inserted Id is available just after the insert step.
Just add a “set value” step in server connect steps, after the insert step, bind the inserted Id as a value and enable the “output” option. Then setvalue step will be available on the front-end.
You can check the docs here, to see how to access the inserted id https://github.com/Wappler/docs/wiki/Get-Inserted-Record-ID
i was determined not to ask this but after several hours of failure to work it out i have to ask.
I am basically trying to do the same as Ben
I have created the insert server action, added a set value to bind to the value of the last id to the variable and checked Output.
How to i access that variable at the app connect front end? it does not seem to appear anywhere. I tried adding an extra server connection (with no auto load to stop it running) but I still cant find the value in any data picker. I am sure the answer is “easy when you know how” but any help appreciated. I promise a video on the topic if i can work it out myself!!
Good evening… I really appreciate your tutorials. However, after viewing your tutorial about 5 times, I have a question. Do you have to use an Update action for this to work?
So far, how I am trying to use it isn’t working.
Here’s what I am trying to do. I would like to capture the new ID so that I can use it to filter via URL on the next page. On the next page, I have a detail list that I would like to show only the data that matches that ID that was passed over via URL.
Example: A user fills out the form for their credentials, then click submit and are sent to a review page to verify and make any changes if necessary.
Some reason when I use your tutorial, the result ends up each time with an empty ID in the URL, i.e. page.php?id=
Hi Hyperbytes, I’m following your video step by step but there are problems.
In the data bindings tree (“go to” setup) there is nothing undrer data.
What do you suppose I’m missing?