Apps Script Return Value in automation works only for last row

Hi, 

i have an automation, that triggers a App Script for each row and sets the return value to a colum "c" in the next step.

m_guenther_1-1679734372796.png

m_guenther_0-1679735917219.png

 

m_guenther_1-1679735073015.png

m_guenther_0-1679736009462.png

 

 

m_guenther_2-1679734447212.png

 

m_guenther_0-1679734312279.png

 

But the return value is only stored for the last row:

m_guenther_0-1679735020926.png

 

https://docs.google.com/spreadsheets/d/1h3lPn2BmuEBImosCxxw85V--okkahVGISWW0B3i4XIY/edit?usp=sharing

Whats wrong?

Thank you!

Solved Solved
0 7 755
1 ACCEPTED SOLUTION

Hello @m_guenther 

I can confirm this. I too had an automation that returns a unique value for row of the table. Like wise it was triggered by schedule and like wise i only got 1 return.

My hypotesis way the trigger, given it was just 1 bot it would probably return 1 value(?)

To fix this on my case. I had to do some extra steps.

1. Create another column on my target table called "trigger"

2. Call a scheduled trigger to just add 1 on all my target table's  "trigger" column

3. For the automation with a return, i changed the trigger to "on update" with a condition that "trigger" column  is not equal before after.

The essense of this work around is that 1 scheduled bot triggers and cascades to multiple bot targeting the each specific row with a row level return.

Hope this can help.

View solution in original post

7 REPLIES 7

1. Try testing it from automation test screen.

2. Check if you have any security filters ?

3. Which column is key column in this table ?

Yes I tried test from automation screen, same result..

No security filters, key is "a". This app is only a test app because I have the same problem in a more complex app. If you want I can share the app with you.

m_guenther_0-1679752605648.pngm_guenther_1-1679752619735.png

 

Hello @m_guenther 

I can confirm this. I too had an automation that returns a unique value for row of the table. Like wise it was triggered by schedule and like wise i only got 1 return.

My hypotesis way the trigger, given it was just 1 bot it would probably return 1 value(?)

To fix this on my case. I had to do some extra steps.

1. Create another column on my target table called "trigger"

2. Call a scheduled trigger to just add 1 on all my target table's  "trigger" column

3. For the automation with a return, i changed the trigger to "on update" with a condition that "trigger" column  is not equal before after.

The essense of this work around is that 1 scheduled bot triggers and cascades to multiple bot targeting the each specific row with a row level return.

Hope this can help.

Hi @ChristianLi , 

thank you that work around fixed the issue.
But the issue looks as an appsheet bug for me.

Thank you  for your help

 

Be sure to report to AppSheet Support. While there are lots of deficiencies in how they address support cases, it's also important that they're explicitly aware of this type of nuanced bug. There are multiple recent community conversations regarding automation-related bugs.

If you didn't already, review your AppSheet Automation Monitor and your Apps Script project's execution log to confirm whether the issue is that the script is only triggered once or its return value is only saved once.

the script is trigggerd for each row.

Top Labels in this Space