Saving a new Joomla user to two tables, users and a related table misc_user_addfields
The pk for users = id (int, auto increment)
The fk for misc_user_addfields = userid (int)
So what I’m trying to do is make userid = id so that when the form saves the two records are related.
In setup have a save user action and inside its success event have a save data action, see images
Don’t understand why there’s a duplicate key - the pk and fk are in different tables
And just to confirm what the two left override columns represent
Left column = fieldname
Middle column = data source
Seems then the last entry in overrides should work, ie find the id in joomla _user15 and insert into userid.
If this works then userid = id and the two tables are related.
No?
https://snag.gy/DxZoC1.jpg
https://snag.gy/XWqY5D.jpg
The pk for users = id (int, auto increment)
The fk for misc_user_addfields = userid (int)
So what I’m trying to do is make userid = id so that when the form saves the two records are related.
In setup have a save user action and inside its success event have a save data action, see images
Don’t understand why there’s a duplicate key - the pk and fk are in different tables
And just to confirm what the two left override columns represent
Left column = fieldname
Middle column = data source
Seems then the last entry in overrides should work, ie find the id in joomla _user15 and insert into userid.
If this works then userid = id and the two tables are related.
No?
https://snag.gy/DxZoC1.jpg
https://snag.gy/XWqY5D.jpg