Add a new row to another table using values from the childs rows from this row

What's up friends? Today I bring the following doubt. I am creating a POS with appsheet and I have the following 3 tables:

"Menu": a table containing items, for example, mozzarella pizza.
"Components": a table containing Marรญn components, extras and optionals.
"Records": containing records of purchases.

When I touch a menu row, the view goes to the child table which is components. There I can configure the order. In it I can add or remove soft drinks, extra cheese, etc., through inline actions. Once the order is configured, I can go back and go to the menu view, where I can choose the number of items to purchase (with the configuration that I have designated for its components).

I would like to create an action that allows me to "add rows from the components table to the records table" but i need that located in the menu table (not in the components table) and that acts by copying the records of the related components of the table " menu" to the records table. I would like someone to tell me, first, if what I am proposing is possible to do and, if possible, explain to me how I do it. I thank you enormously in advance.

in summary, copy all related rows from the current row to another table

GREETINGS

Solved Solved
0 2 1,414
1 ACCEPTED SOLUTION

Yes, I think Appsheet can be do it by two actions.

Step 1:  at the Component table: You can use the action: "Add a new row to another table using value from this row"

Step 2: at the Menu table: You can use the action: "Execute an action on a set of rows"

In this action:

"For a record of this table": You set "Menu"

"Referenced Table": You set "Component"

"Referenced Rows": FILTER("Component table",[_THISROW].[ID of Menu] = [ID of Component])

FILTER("Component table",[_THISROW].[ID of Menu] = [ID of Component])

"Referenced Action": Call the action at Step1

View solution in original post

2 REPLIES 2

Yes, I think Appsheet can be do it by two actions.

Step 1:  at the Component table: You can use the action: "Add a new row to another table using value from this row"

Step 2: at the Menu table: You can use the action: "Execute an action on a set of rows"

In this action:

"For a record of this table": You set "Menu"

"Referenced Table": You set "Component"

"Referenced Rows": FILTER("Component table",[_THISROW].[ID of Menu] = [ID of Component])

FILTER("Component table",[_THISROW].[ID of Menu] = [ID of Component])

"Referenced Action": Call the action at Step1

I must say that this is "THE SOLUTION". I don't handle stocks that easily so your response has been a great help. With a couple of configurations I achieved the goal. Thank you so much