I have a form that a user enters a certain number of boxes. This row has an ID with few other columns but the ID is all that really matters in this Table 1 for my issue. I have Table 2 that I need to copy over that ID number from Table 1 and insert the number of boxes entered as that many rows into Table 2. For example, in Table 1, ID=001 and I enter number of boxes as 10. I am done with Table 1 so I submit that form but I want the app to edit Table 2 to insert 10 more rows with the ID=001 and a number of boxes column to increment from 01 to 10, all of which keep ID=001. Thus Table 2 should then have 10 more rows with all rows of ID=001 and Box=01,02...09,10.
The following is NOT correct, but am I on the right track?
ClearCollect(colBoxDatabaseInsert, {ID: DataCardValueID, QtyBox: DataCardValueQTY});
ForAll(colBoxDatabaseInsert,
Patch(BoxDatabase, First(Filter(BoxDatabase, FFID=DataCardValueID.Text)),{Box: 01})
);
SubmitForm(EditQCForm1);
back();
Eventually, I will be moving, at least, Table 2 to MySQL or SQL. I have an authentication issue with the MySQL server/gateway connection and will circle back to that later. Want to mention this in case this is easier to do or only to be done in SQL.