create a button to add multiple fields of same category in appsheet form

Hi,
I have created a form/app in AppSheet. The main idea is to record sales orders. So, the form contains the following field,
Date/Time:

Order ID:

Barcode: 

Qty: 

Now, with this setup, I can only add one barcode at a time. To add another barcode I have to start over the form. But, I want to add a "+" button somewhere besides the Barcode field where a user can add barcode fields as required. For eg: if Sales Order No.1,  has more than one item then to record this I have to fill up the form twice. But, If I can create a button beside the barcode field to add more than one barcode then I'd be able to add both the items in a single form. 

Can anyone suggest a workaround for this? 

1 1 984
1 REPLY 1

You will want to consider augmenting your data design to have "Orders" and "Order Details" tables and then create a Parent/Child relationship between them.  AppSheet has a feature that makes this relationship very easy to establish once you have the data tables setup.

The data tables would be:

  1. An "Orders" table, the Parent, and would have columns that are generic/constant to the entire order such as Order ID, Date, Customer, etc. 
  2. An "Order Details" table, the Child, containing a column to specify which Order it belongs to (its Parent) and then all of the columns providing details of item being ordered - Order Detail ID, Barcode, Quantity, Price, Total, etc.

Once you have your tables created, you would then edit the Order column in the Child table and set its  "Is part of" setting to "ON".  AppSheet will automatically create the appropriate Parent/Child relationship between the tables and surface an Inline Table in the Form to allow adding of one of more items to the Order as well as an Inline tAble in the Order Detail view so you can see what items have been included in the order.

To get more information on how to setup this relationship, scroll down in the article below to find the "Express ownership between tables" section.

https://support.google.com/appsheet/answer/10106510?hl=en#:~:text=Go%20to%20the%20Data%20%3E%20Colum....

To get more information, search this forum for "Parent Child".  This is a common topic and you will likely find many posts with more details to help out.

I hope this gets you pointed in the right direction!!

Top Labels in this Space