Automatically Copy

Automatically Copy some values from Another Table to a certain table (HELP)

Newbie here. I have this products. This picture shows my Product Table
image

Now, I want to add them directly to OrderDetails Table after adding them to my Products Table (picture above). How can I do that? Just like how the values in OrderDetails Table is linked automatically to Orders Table (another table with concatenation of Order ID column and OrderDetail ID column on OrderDetails Table )

Orders Table:
image

OrderDetails Table:
image

Is this possible? Automatic linking of data from Products Table to OrderDetails Table ? What formula do I need?

Yes! AppSheet provides features to do precisely what you are suggesting. You’ll want to create table relationships.

First, you want to create a Parent/Child relationship between your Order table and the OrderDetails table. To do so refer to the article below, section “Expressing Ownership Between Tables” using the IsPartOf property.

Then in your OrderDetails table you’ll want a Product column defined as type “Ref” with the source table as Products. This allows you choose from a list, the Product to place on each OrderDetails record. You can refer to the same article below for more details.

If you still have questions, simply respond again in this thread.

Can I use action on these? So that whenever I click a button from my Products Table it will automatically send values to OrderDetails Table and Orders Table. @WillowMobileSystems

Generally speaking Yes you can still create buttons to perform such Actions but in reality it depends on what you are trying to accomplish. Can you describe an example yo have in mind for such an Action?

What I mean is: Whenever I add a new Product to Products Table, it will also automatically add that new Product to another table called Order Details. Do I need actions or expressions or formula?

Yes you can with a Workflow and an Action.

There is an option named “Data: add a new row to another table using values from this row”. So you could setup a Workflow that triggers when a new Product is added. That Workflow will call the Action to add the row in the other table.