Automatically duplicate record to other tables
Posted: Tue Apr 15, 2025 5:17 pm
Hi all,
Currently I am running into a challenge which I will try to explain as concise and clear as possible.
In nuBuilder I have an edit-form with data of a specfic Delivery-order. In the database I store this data in the table 'Order' and all the items of the Delivery, which are in a subform on the edit-form, in the 'Orderitem' table. Since the delivery can be invoiced in multiple parts, I added a button to the edit-form. When the button is clicked, it should do the following:
Show/create a new edit-form which is the same as the delivery edit-form and has all the same data, but all this data should be stored in the 'Invoice' and 'Invoiceitem' tables. In this way the user would be able to make custom invoices that are based on the deliveryorder. In other words, an invoice should be created which can be further edited by the user.
I can imagine my explanation is a bit vague, because it is quite a specific question. To make things a little more clear I added an SQL export of a simple and anonymized version of the database.
Thanks a lot in advance guys!
Currently I am running into a challenge which I will try to explain as concise and clear as possible.
In nuBuilder I have an edit-form with data of a specfic Delivery-order. In the database I store this data in the table 'Order' and all the items of the Delivery, which are in a subform on the edit-form, in the 'Orderitem' table. Since the delivery can be invoiced in multiple parts, I added a button to the edit-form. When the button is clicked, it should do the following:
Show/create a new edit-form which is the same as the delivery edit-form and has all the same data, but all this data should be stored in the 'Invoice' and 'Invoiceitem' tables. In this way the user would be able to make custom invoices that are based on the deliveryorder. In other words, an invoice should be created which can be further edited by the user.
I can imagine my explanation is a bit vague, because it is quite a specific question. To make things a little more clear I added an SQL export of a simple and anonymized version of the database.
Thanks a lot in advance guys!