Does it not work that "Grouped: execute a sequence of actions" has two "Data: execute an action ..."

Hi.

Does it not work that "Grouped: execute a sequence of actions" has two "Data: execute an action on a set of rows"  with INPUT() function?

I made the bot for a loop.

There are two "Data: execute an action on a set of rows" actions. One is for setting a value(using input()) and the other one is for adding a row using the value.

And a "Grouped: execute a sequence of actions" action contains the above two actions.

My bot result:

When the second "Data: execute an action on a set of rows" action loops and adds a new row, it should apply each value, but only the last value in all.

Thank you in advance.

Solved Solved
0 8 242
1 ACCEPTED SOLUTION

Check this:

https://www.googlecloudcommunity.com/gc/Tips-Tricks/Nested-Action-Loops/m-p/377956#M5211

This post was originally written on the old forum, there are several collapsible sections in there, if something seems missing, click on the text to open the section. new forum didn't translate it over well. Some of the section headers are "Column structure for..." , "action set overview" , "and here are the individual..."

View solution in original post

8 REPLIES 8

Yes it should work. I use a grouped action to execute multiple looping actions to trigger in multiple tables. More like loop inside another loop. 

I will elaborate on my case.

There are two tables for a loop. One has two rows("sptidec19b499", "sptidc06c7630") and the other one has five rows ("1D38BC27", "4B42E1AE", "8766D511", "8E8A6CB8", "F1D5725E")

I tried to create 10 rows with above two table.

The result I want would be:

IDseparateIDceIDamount
a2e44b46sptidec19b4991D38BC271000
edc021bcsptidec19b4994B42E1AE1000
5ef49c74sptidec19b4998766D5111000
4d0f4eb4sptidec19b4998E8A6CB81000
a3b2958fsptidec19b499F1D5725E1000
a2b23ef5sptidc06c76301D38BC271000
08837d82sptidc06c76304B42E1AE1000
c41b1784sptidc06c76308766D5111000
8a3d03d8sptidc06c76308E8A6CB81000
962673ffsptidc06c7630F1D5725E1000

However, the actual result was:

IDseparateIDceIDamount
a2e44b46sptidc06c76301D38BC271000
edc021bcsptidc06c76304B42E1AE1000
5ef49c74sptidc06c76308766D5111000
4d0f4eb4sptidc06c76308E8A6CB81000
a3b2958fsptidc06c7630F1D5725E1000
a2b23ef5sptidc06c76301D38BC271000
08837d82sptidc06c76304B42E1AE1000
c41b1784sptidc06c76308766D5111000
8a3d03d8sptidc06c76308E8A6CB81000
962673ffsptidc06c7630F1D5725E1000

What could be wrong?

How exactly did you define the actions?

I have three tables with no relation to each other:
    - control
    - separate
    - ce
And as an action (bot), I want to create a row in the following table.
    - request

The design of the actions is as follows.

In the "control" table there is an action called "run action on rows of separate GA". This action executes the "GA: set an applingSeparate and add a request" action of the "separate" table with type "Data: execute an action on a set of rows".

The "GA: set an applingSeparate and add a request" action in the "separate" table is of type "Grouped: execute a sequence of actions" with the following two actions.
    - g1: run action on rows of control
    - g2: run action on rows of ce

The "g1: run action on rows of control" action runs the "set an applyingSeparate" action in the control table. At this time, the key of the separate table is passed to the INPUT() function. The "set an applingSeparate" action of the control table is a "Data: set the values of some columns in this row" type action and inputs the key of the separate table into the applingSeparate column.

The "g2: run action on rows of ce" action runs the "add a request" action of the ce table. The "add a request" action adds a row to the "request" table with the type "Data: add a new row to another table using values of this row" as follows:
<Set these columns>
    - separateID = INDEX(control[applingSeparate], 1)
    - ceID = [_THISROW]
    - Amount = 1000

The result of the action is as described above post.

Thank you.

Your setup would require serial execution, but reference actions execute in parallel.

Check this:

https://www.googlecloudcommunity.com/gc/Tips-Tricks/Nested-Action-Loops/m-p/377956#M5211

This post was originally written on the old forum, there are several collapsible sections in there, if something seems missing, click on the text to open the section. new forum didn't translate it over well. Some of the section headers are "Column structure for..." , "action set overview" , "and here are the individual..."

@Marc_Dillon thank you.

The "COUNT > 0" loop was just the way I thought in my head. It works perfectly.

BTW, in my case so far, adding rows with the bot was processed very quickly. It seems that it takes some time to process this action with a bot. Is it normal that it takes some time?

Yes, adding many records via Bot is typically more performant than with actions. The advantage of the latter is that the records are immediately available in the user's app.

Top Labels in this Space