I've sucessfully used the Looping With Actions method before, but I've come across a hitch which doesn't seem quite right?
I'm incrementing a counter on every iteration of the loop as well as calculating a new UNIQUEID(). The current counter is written back to the table row as usual and logic checks it doesn't go out of bounds so that the loop stops and doesn't run indefinitely.
For every increment of the counter and creation of a UNIQUEID(), I would expect that to be queued up as 2 record syncs in the top right hand corner, however, it only seems to sync 1 record up. Even if my counter has more than 10 increments, there is only one record to sync.
If I check the backend database, I get to see this synced data and the counter is whatever the last value would have been for that record which indicates it incremented that many times. Google Sheets has a cell history and the history only shows 1 update.
Now the problem is that I want to trigger a bot on each iteration of the counter. However the bot only triggers on the 1 update that is synced.
It seems like all the iteration stuff is being done on the client against a virtual table and then the final result is written as 1 sync. It triggers the bot...the bot runs fine (calls the Appsheet API) and finishes neatly. But I need all those updates to be counted as bot triggers.
Anyone have any idea if this is possible?
I've not seen that behavior myself, but it wouldn't surprise me if there is some internal optimization going on that produces that effect.
Please post screenshots of the involved action configurations.
Hey @Steve here is a list of actions in the order they are run. It follows your Looping with Actions post to the letter and I have used this may times previously.
and finally, the logic to stop the loop from running again
I put that logic check on all of the three actions in this loop just to be safe! ๐
So just to repeat, a bot is checking for Updates and conditionally checks the LoopCounter to see if the before value is not equal to the after value. All loopcounters start at 0 and will end at [Amount]. So there should be [Amount] firing of the bot.
I think that probably bots aren't prepared to be triggered that fast. I think that 1 per second may be the maximum rate
Let's see. You want your action to be considered 2 edits because you are changing 2 fields of the rows?
I will post some screenshots to @Steve reply @SkrOYC , but essentially I am incrementing a counter. I am storing the new value of the counter back to the record...this should be counted as a record_UPDATE. I have a BOT watching for an update with a condition that it checks the value of the counter [_THISROW_BEFORE].[Counter] <> [_THISROW_AFTER].[Counter]
What seems to be happening is that there is only 1 record update being triggered. The last one.
At the start of the loop, counter = 1. At the end, counter = 19. The bot fired on 19 and missed all the other values...but it specifically didn't miss them....it's just there was only 1 record update created.
User | Count |
---|---|
25 | |
15 | |
4 | |
3 | |
3 |