Add multiple rows to child table when a parent table is updated

Hello

I am trying to figure out a way to add multiple rows in child table for the production steps related to this work order products. I have a table For products and products a have a child table for Multiple production steps attached to the products.

When i create a work order there is a child table attached to work order to add products related to that work order. What i want is… Whenever a new product is added to this child table of work order i want to add all the production steps related to the products in child table of work order into another table.

I tried many workaround and it is not working. I need to calculate the price, time etc… as per work order quantity. So the idea is to create child table record for production steps attached to work order ID whenever we create a new product inside work order.

It would be really great if i can find a way. Thank you everyone in advance!

This should be a post you are looking for.

2 Likes

Thanks for the reply. I checked and i dont think this will work for me.

Why not?

Definitely it would work, provided your are ready to get your hands dirty.

1 Like

Because I have a table with product description. A child table with multiple rows attached to this products table for production steps. Whenever I add products to work order child table. I need all the production steps to be added to another table.

What I can tell you is examine the docs and post @Steve to us.

his trick would work for sure on your case.

2 Likes

{
“Action”: “Add”,
“Properties”: {
“Locale”: “en-US”,
“Location”: “47.623098, -122.330184”,
“Timezone”: “Pacific Standard Time”,
“UserSettings”: {
“Option 1”: “value1”,
“Option 2”: “value2”
}
},
“Rows”: [
<<Start:SELECT(production steps[production step id],[_thisrow].[product description]=[product description])>>
{
“Product Description”: “<<[Product Description]>>”,
“Work Order Products ID”: “<<[Work Order Products ID]>>”,
“Work Order ID”: “<<[Work Order ID]>>”,
"Production Step": "<<lookup(product description,production steps,production step, product description)>>"

},
<>
]
}

I tried this and its not taking production steps matching to the product description. This webhook works fine to add multiple rows. But this does not take the value from other table is there any way we can index all the production steps related to specific product and take one by one into the new table.

Its blank returning blank value. The first product have multiple production steps.

I want to take the value from this table

I’m not sure what you are trying to do . Why api is get invoked ?

1 Like

Because i want to add production steps like copy and paste for that product. it might be sometime 3 rows, 10 rows or even 25 rows

As I suggested, try the trick Steve introduced. Without employing API, you can achieve what you want.

2 Likes

I wont be able to do it. I have to match all the product in the work order products to the production steps related to that product in a different table.

Is there any match or index function that will increment the value of rownumber. So all the production steps related to that product can be taken to another row.

I m not entirely sure what your requirement will be, but it seems you have three schema ; -

  1. Order Table - grand parent
  2. Product - Parent
  3. Steps - Child

Upon adding new row to Product, then fire the actions Steve introduced. Once new product is added to Product table which is under the Order table, then steps (set of row associated to each product) will be automatically added to step table.

This is all what I can comment to you

3 Likes

Thanks a lot.

I used this idea and a small work around and it’s working perfectly.

https://www.appsheet.com/Template/AppDef?appName=community30953-381190#Behavior.Actions.Control%20Table.Action%204%3A%20Add%20More%20Rows

1 Like