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!

Solved Solved
0 15 1,434
1 ACCEPTED SOLUTION

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

View solution in original post

15 REPLIES 15

This should be a post you are looking for.

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

Why not?

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.

{
โ€œ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 ?

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.

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

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%20Ta...

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

Top Labels in this Space