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
2X_0_0149ee86fe11c782dea38b9c6ae17fadb8458ca7.png

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:
2X_c_c91309af623421deb480ac18dbfa4dda151d132e.png

OrderDetails Table:
2X_a_a5d07afb0fa842e1af5291920a8cb7c92f14fb4a.png

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

0 5 433
5 REPLIES 5

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.

Top Labels in this Space