I am using a form (CIForm) to update a table T_CI which has three fields: ciIndex (the key) CItxt & Date.
On the CIform, there are two fields.
On successfully passing the information to the T_CI, the CIform goes to the next form-COGForm which updates another table T_COG.
T_COG has many fields all on the new COG form. But I need to pass to T_COG the value ciIndex. I don’t know what it is.
How do I do that?
The only workaround I see is to ‘trap’ CItxt as a cookie and pass that value to the COG form ( first altering the T_COG from ciIndex to CItxt) - which sweems very clunky
Thanks in advance
Hi @beden,
What I would do is pass the ciIndex from the T_CI form to the COGForm using a URL Parameter as discussed here, https://docs.wappler.io/t/define-url-parameters/2913.
After passing the URL Parameter, on the COGForm, I would add a query to Get the URL Parameter and add it to a hidden field. You can do that by selecting Dynamic Attributes > Value and bind the value from the query.
@beden,
Please check the documentation showing how to pass values between your pages:
Can you explain that a wee bit more? Please --
A great tool and I use it a lot but this is not from page to page. On passing the information from the first form I do not know what the index will be. The table on getting the information adds the index to that table. The CIindex being the table key.
I want to pass that same index in subsequent forms to different tables
You don’t know the last inserted record id, is that right?
Yes
And I need it
Of course you know it - it’s available after the insert record step.
Add a setvalue step after the insert record step, and then select the identity as a value. Enable “Output” and it’s already available on your page.
Store this setvalue step in a session as explained in the tutorial and you are done.
That’s already been explained in the docs:
Truly grateful
Thanks
Accessing the last ID is explained in this old video I did Michael
Yes, getting the last record ID is the best option. I misunderstood and thought the value was already existing, not being created as part of the insert on the first form.

