Question About Creating One Record (Combined) inside a For Each Loop
I'm working with two tables, a Parts Task table (parent), and a Task Activities table (child). Each activity represents a part number shipped from a specific location, e.g. MISC-1-A10, MISC-1-A20, etc. Here are the steps, via a Pipeline, I'm trying to achieve but I'm stuck on step D:
-
When the shipping task is completed the Pipeline is triggered.
-
Create a new receiving task from the completed shipping task in step A.
-
Search for all related activities for the task in step A.
-
For each activity I would normally create a copy from step C and append that to the task created in step B, but in this case, I want to create one combined activity for all activities with the same part number and combine their 'Quantity Shipped'.
-
In the attached image, you'll see we have three line items for '2525…., Fake Part'. With a combined 'Quantity Shipped' of 10.
-
I'd like to merge all three line items into one receiving activity of 10 shipped.
-
Is there a way to do this with a Pipeline or do I need to separate the activity creation into a webhook or something similar?
------------------------------
AR
------------------------------