Okay, so before I go into what looks like a long tedious process of populating my dialog using the method described in video D57, I am hoping I can get some insight on here for an easier way for me to accomplish what I am trying to do. To break it down simply I have a button on a dialog that gives the user the option to load data from the tables of a "Trip" they've done before and chosen to save (by save I mean I've put a simple logical column in the table that is 1 if the user checked a radio button to save a trip when they put it in originally). So I load these "saved" trips into a list in a pop-up window that the user can select from and then click a button that says "Load saved trip". Now is where it gets tricky, I want them to be able to save the data (and any edits they choose to make) from the loaded trip as a new entry in the tables (i.e. do an INSERT with a new ID), but it obviously wants to do an UPDATE. I'm setting the primary key for the most top level table when the dialog initializes (this is just because I've had issues in the past with the auto-incremenation and the fact this is a very complex and large dialog), and so when I manually changed this ID back to the one it was originally set to when the dialog was loaded (the ID gets overwritten obviously when I do the loading of the "saved" trip using populate javascript action) and tried to save but it didn't like that.
So simply, other than manually loading the data into the dialog using the techniques from the video D57, is there a way to save populated data as a new entry into the tables? I thought about using the javascript CRUD action but this only lets me do an insert into a single table and as you can imagine this dialog is tied to quite a few tables with different parent-child links. Thought maybe I could do multiple CRUDs (one for each table that needs to be save too) but I can't even get one of them to work so I don't want to go through this process either if its bound to be a no go anyway!
Thanks for the help!
So simply, other than manually loading the data into the dialog using the techniques from the video D57, is there a way to save populated data as a new entry into the tables? I thought about using the javascript CRUD action but this only lets me do an insert into a single table and as you can imagine this dialog is tied to quite a few tables with different parent-child links. Thought maybe I could do multiple CRUDs (one for each table that needs to be save too) but I can't even get one of them to work so I don't want to go through this process either if its bound to be a no go anyway!
Thanks for the help!
Comment