Buy Now
Sign in

Save data to different tables

R
ricardo.coelho@lajeviva.org.br 3
March 13 at 17:29 #384788
Hello,

I would like to know if you have the possibility to save the data of a form in different tables. Because I have a main form but the data should be saved in different tables for better control of the information.
Does Chronoforms enable this?
admin 26.5
March 14 at 18:57 #384846
Hi Ricardo,
Yes, just use multiple "Save data" actions, leave the "Data provider" empty and list the fields your want to save along with their values in the "Insert override" box!
Best regards
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
B
bkgraf 33
March 15 at 22:57 #384893
Hello, good afternoon, can you give me an example? I do not understand how to do it.
admin 26.5
March 16 at 11:53 #384907
I explained in the post how its done, maybe you can give more info about your requirements ?
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
B
bkgraf 33
March 16 at 14:29 #384911

Hi, thanks for answering.

I have a form, there you must enter the data and when saving, you must fill in different tables. (Attached the model entity realization to see what I want to do).modeloEntidadRelacion.JPGsubmitSeccion.JPG

I can only sleect a table that is where you send me the information.
submitSeccionFields.JPG
I do not know where to put the other options to "save data" and that I fill the other tables.

Now is it a little clearer?
Attachments
modeloEntidadRelacion.JPG
modeloEntidadRelacion.JPG
(38.64 KiB)
98 Downloads/Views
submitSeccion.JPG
submitSeccion.JPG
(64.85 KiB)
100 Downloads/Views
submitSeccionFields.JPG
submitSeccionFields.JPG
(73.46 KiB)
99 Downloads/Views
healyhatman 5.7
March 17 at 01:49 #384925
1
 Answer
You need multiple save data actions, one for each different table you want to save into.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman

You can now copy+paste code from forums
B
bkgraf 33
March 27 at 22:43 #385304
Hi, could you tell me how to do it?or any example of where you can guide me?In a SAVEDATA how do I separate the fields that I will save in a table?In the other SAVEDATA should I put the missing fields to save in the other table?Sorry but I do not know how to do it.I appreciate your cooperation and instructions!
healyhatman 5.7
March 27 at 22:59 #385305
Put the data you want saved in one database in one save data action, put the data you want saved in the other database into the other save data action.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman

You can now copy+paste code from forums
B
bkgraf 33
March 28 at 04:48 #385306
healyhatman, thanks for answering.Excuse my ignorance, I will try to be a little more explicit in what I need.
I have a form in Chronoforms V6, from there I have the fields to enter the information.
forumChronoforms.png
As you can see in the image I must insert records in three different tables.
That's where I do not know how to configure the SAVEDATA to save correctly.
I do not know how to tell you which fields to keep in one table and which in another.
Thanks for your help.
Attachments
forumChronoforms.png
forumChronoforms.png
(42.65 KiB)
49 Downloads/Views
healyhatman 5.7
March 28 at 05:06 #385307
How do you not know? You made the fields and the tables right? Surely you know which fields you want saved to which table?
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman

You can now copy+paste code from forums
healyhatman 5.7
March 28 at 05:09 #385308
basically none of your save data actions should have "data source" filled in, not should they be set to auto save or auto manage.
Primary table you would have the fields you want in the primary table. Like
databasefieldname:{data:formfieldname}
Then in the secondary related table's save data action you would have
foreignfieldid:{var:save_data#.id}
databasefieldname:{data:formfieldname}
Where save_data# is the name of the primary save data action.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman

You can now copy+paste code from forums