I have a database structure that looks like this:
Invoice
- Invoice No: text
- Customer Name: customer
- Date: date
- Total: number
Invoice Item
- Item Name: item
- Detail: text
- Quantity: number
- Unit Price: number
- Subtotal: number
- Invoice: Invoice
The layout for the create page looks something like this:
Each invoice can have multiple invoice items.
Currently, when the create form page is loaded, it directly creates a new invoice and invoice item record in the database. We enable auto-binding for each input field in the repeating group. However, this creates a problem where a new database record is created every time the page is loaded. How can I create and save repeating group data without using the auto-binding method and only create the database record once the user clicks the “Create Invoice” button?
1 Like
Hey @yuehong
On Invoice Data Type, they can create a new field something like: Is Invoice Final = Yes/No. The default value is: No.
On invoice-page load, They can add a condition on the Create Invoice Workflow(Only when Do a Search From Invoice Where Is Invoice Final = No).
When Loading the Invoice Details:
They will only load the Invoice created by the current user where Is Invoice Final = No
When the user clicked on the “Create Invoice” button, they can Add a workflow to update the Invoice created by the current user where Is Invoice Final = No into “YES”
Hey, hoping that you all are doing well.
Can you please tell me how can I prevent new invoice records from being created on page load and only finalize the invoice record once the create invoice button is clicked?
First, you must disable auto-binding.
When you click on the create invoice button, you create a new invoice in the database. - “Create a new thing” of the Invoice Item type, with all its fields.
In a second workflow, you must change - “Make change to thing” the result of step 1, linking this invoice item created with the other table of the Invoice type.
I hope this was clear to you and that it may have helped you in some way.
Thank you for your answer. Could you please explain in detail how to save and create repeating group data without using the auto-binding method? I’m not sure how this part works.