Bulk Action applied on several Child rows that add only ONE row in Parent.

I have an SKU table (Child). I would like to create a bulk action that allows my users to select multiple SKUs, and create ONE new Quotation that contains these SKUs (create a parent record in Quotation table).

The problem i face is that if X number of SKUs were selected, the Actions and Bot triggers will be triggered X times. I end up with X number of parent rows instead of only one.

Is there a method to create only 1 row record in a parent table through bulk action?

(PS: Currently, this task is initiated at the parent level, and children are added via a EnumList with data validation. It works. But the intuitive process for my team is to select the child first.)

Solved Solved
0 10 159
1 ACCEPTED SOLUTION

This is doable and it's not that complicated. The process is this:
#1 - Add one additional text column to your child table, lets call it "Timestamp"
#2 - Create an action to your child table that updates this "Timestamp" column with an expression USEREMAIL()&"_"&NOW()
#3 - Create a Bot for your Child table (Updates Only)
#4 - Add a task "Run a data action" which adds a row to your Parent table
#5 - It needs to write the key column and Enumlist values to that Parent
#6 - The "Timestamp" column writes the value to your key column
#7 - The EnumList column is written with CONCATENATE(SELECT(Childs[ID],[Timestamp]=[_THISROW].[Timestamp]))

When you first bulk select child rows, it updates all of them with the same email address + the same DateTime value as they are read as bulk. And when your Bot is creating multiple parent rows, it actual adds only one because the key value is the same. That means the first update adds the Parent and then the rest of are just updates for the same already created Parent.

View solution in original post

10 REPLIES 10
Top Labels in this Space