I have a requirement to copy data from one user form to another.
If a user has made one order, it is saved in the database. I need a functionality where I can use the saved order's data to be copied to another form. Does anyone know how can I achieve this functionality?
Example would be very helpful.Thanks
Discussion posts and replies are publicly visible
Tan18 said:so when user click on copy button
There is lots of magic you can do using the a!save() function inside the saveInto parameter of many component types (especially buttons). For instance you could allow the user to select an existing record (which you've queried onto a form, perhaps in a grid), then press "COPY", and when that is pressed, copy the values field-by-field into a new/blank local variable (with cleared-out primary identifiers as Stefan mentioned), and fill in further details / changes as needed.
How can I clear out primary identifiers. Do you have any examples to share?
Set set the fields to NULL using a!update(). For lists, use a foreach.