Copy data from 4 rows to one particular row in another table

Hello,

I create an App that manages tyre hotel for client tyres, working orders etc. I created dozen of action to manage those tyres through warehouse to service, work orders etc. The tables that I have in app:

  1. Calendar table // google calendar were clients make an appointments
  2. WorkOrder table 
  3. Warehouse table // every tyre in warehouse has unique SKU number(Key) and every car has an RVS unique number(set of 4 SKU-s)from that car(Label)
  4. Selection table //Help table for export tyre from Warehouse to WorkOrder table

I will try to explain in steps

1.  I have a first action that copy data from Calendar and create new row(NewWorkOrder) in WorkOrder table. Second action jumps me with LINKTOFILTEREDVIEW to Warehouse where I have already filtered results(via number of Car registration plates) 

Calendar view reg sel.JPG

2.  From Warehouse, then bulk select up to 4 tyres that I want to have in WorkOrder table and copy to Selection table. I got then 4 rows, every row with one SKU

Selected tyres.JPG

How can I copy those 4 SKU-s to that particular row that I created from calendar. In that row(WorkOrder table) i have columns in row SKU1, SKU2, SKU3, SKU4.

* Regularly, in WorkOrder table I have initial value set for columns:  SKU1, SKU2, SKU3, SKU4 

INDEX(
ORDERBY(
SELECT(Selections[SKU],TRUE),
[_RowNumber]
),
1)

So, when i hit action to create new row in WorkOrder table, it grabs first 4 tyres from selection table and puts them in those 4 columns.

In new scenario, I need them to be copied to that certain row that I created from calendar.

Thank You al for help in advance

 

Solved Solved
0 2 144
1 ACCEPTED SOLUTION

You don't want to COPY rows.  Instead you want to REFERENCE them - i.e. create a relationship between the Tables.  Check out this article for more information:

https://support.google.com/appsheet/answer/10106510?hl=en

For example, you have a WorkOrder table and then the Selection table.  From your description,  the Selection table rows are details for the WorkOrder row.  These rows should be Child rows to the WorkOrder row as the Parent.  Creating this relationship is easy.  You would simply add a column, maybe named Work Order, to your Selection table and set this column as a Ref to the WorkOrder table AND set the "Is part of" property.  This will create the relationship, allow you add the Selection rows directly from the WorkOrder Form view and view those Selection rows as Details on the WorkOrder Detail view.

With a slightly different relationship, you could add an "Appointment" Ref column to your WorkOrder table and assign it the Calendar row (you would NOT use the "is part of" in this case).   Then when looking at a Calendar row, you can see ALL WorkOrders that have that same Calendar row set as their Appointment Date.

I hope this helps!

View solution in original post

2 REPLIES 2

You don't want to COPY rows.  Instead you want to REFERENCE them - i.e. create a relationship between the Tables.  Check out this article for more information:

https://support.google.com/appsheet/answer/10106510?hl=en

For example, you have a WorkOrder table and then the Selection table.  From your description,  the Selection table rows are details for the WorkOrder row.  These rows should be Child rows to the WorkOrder row as the Parent.  Creating this relationship is easy.  You would simply add a column, maybe named Work Order, to your Selection table and set this column as a Ref to the WorkOrder table AND set the "Is part of" property.  This will create the relationship, allow you add the Selection rows directly from the WorkOrder Form view and view those Selection rows as Details on the WorkOrder Detail view.

With a slightly different relationship, you could add an "Appointment" Ref column to your WorkOrder table and assign it the Calendar row (you would NOT use the "is part of" in this case).   Then when looking at a Calendar row, you can see ALL WorkOrders that have that same Calendar row set as their Appointment Date.

I hope this helps!

Great advice, works perfectly!!!

Top Labels in this Space