Hi Max,
Could you tell me how to get auto increment primary key from "save data" action? I need to use the new record's auto increment primary key for save as the second table data.
Regards,
Kittisak
Hi Max,
Could you tell me how to get auto increment primary key from "save data" action? I need to use the new record's auto increment primary key for save as the second table data.
Regards,
Kittisak
Hi Kittisak
Use the {var:save_data_name.id} shortcode or use PHP:
$this->get("save_data_name.id")
the exact name and "id" field name depends on your save data and table, so check the form debug for that
Hi Max,
I had check debug but they do not have id data in save_data action.
Regards,
Kittisak
Don't forget to set in behaviors from the save the Primary Key on and the the name "id" from the table!
Paul
Hi Kittisak
As Paul has noted, you need to set the primary key in the Save Data behaviors, I forgot this step