Forums

update form

jonnyblog1976 03 Apr, 2018
Hi,
how i update a record?
i use simple 'contact form' of the demo section. i add a save data and it work perfectly.
i duplicate the form, with a read data and with {var:read_data11.Data11.last_name} ecc populate all field.
but with another save data it create a new record and don't update ?
is there any guide i missing?
thank you
healyhatman 04 Apr, 2018
If you have your Save Data Write action set to Auto detect, that doesn't really work.

What you need is a Read Data action that looks for the row you want to update. Under Record Found, you put a Save Data action and set it to "Update". Under Record Not Found, you put a Save Data action and set it to "Insert".
jonnyblog1976 04 Apr, 2018
Hi, thank you for the replay,
i don't understand, i don't want to choose insert or update, i only want to update a record previously loaded.
i explain better:
1. insert a read data, "first matching record" with aid 1.(it's only one record and it exist). the array is populated (see debugger).




2. with {var:read_data11.Data11.last_name},ecc... i populate all the field



3. now,on submit i want to update all the field previously loaded. i missing something here... i try different settings but it doesn't work properly.
i also try to add a field aid that load the array aid but when i submit it return "error impossible to overwrite aid 1..."

Thank you for your help
jonnyblog1976 04 Apr, 2018
" i try different settings but it doesn't work properly.
i also try to add a field aid that load the array aid but when i submit it return "error impossible to overwrite aid 1...""

in the first it create a new record with new aid
in the second give an error

here the table (the table is autogenerate from joomla like in image 2):

jonnyblog1976 04 Apr, 2018
ok i found the solution: it work with this settings:
This topic is locked and no more replies can be posted.