USEREMAIL() cannot be resolved during NESTED BOT RUNS

I have a bot that is set to TRIGGER OTHER BOTS.  Some of the other triggered bots are ALSO set to trigger other bots.  I have a table NOTES that I use to audit events throughout my app.  The NOTES table has a CreatedBy column that is set to have an INITIAL VALUE of USEREMAIL() which means that even if you do not supply a value for that column during a ROW ADD the current user's email address will populate that column.

Here is the tail end of the Initial Bot that triggers the others:-

scott192_0-1704363136473.png

'CopyQuoteItem' is an 'Add new row' to a table that has a Bot set to trigger on row adds.  So this action will trigger another bot to handle that event.

Here is the Bot that triggers when the row is added:-

scott192_1-1704363398262.png

scott192_2-1704363437813.png

The 'Notify' section is an 'Add new rows' with the following data:-

scott192_4-1704363971287.png

For the purposes of testing, I have forced a value ("someone@somewhere") into the 'CreatedBy' field in this step.  Remember, the column in the NOTES table has an INITIAL VALUE of USEREMAIL() set.

With the forced value, the step executes perfectly.

With USEREMAIL() as the value, it seems to evaluate to BLANK/NULL?  and causes the bot to terminate with this message in the Automation Monitor log for that task:-

scott192_5-1704364332839.png

So, here I am at the end of this long post and I am being reminded of a support call with similar symptoms involving RETURN values from Appscript Tasks being lost when the option to 'Wait for Execution to Complete' is set on a bot that has the task.

Appsheet Engineers!  Something is going VERY wrong in the bot execution pipeline that is causing loss of data and bot failures.  Surely I cannot be the only user in this community that has encountered these bugs?

To emphasise the point made in the description of the problem above, the 'Notify' section of the bot works perfectly if the bot is triggered from a standard record add, but not when triggered from other bots...other bot triggers cause USEREMAIL() not to evaluate or to evaluate to BLANK/NULL.

I cannot imagine the hassle involved in trying to explain this problem to Appsheet Support who by the way told me after they had investigated the Appscript Tasks problem that turning off  'Wait for Execution to Complete' in the bot resolved the problem!

Does anybody know who I should '@mention' in this post to make sure the correct people get to investigate?  I cannot be bothered with the support pipeline, it ages me!

 

Solved Solved
0 5 205
1 ACCEPTED SOLUTION

So I must come back to this post and write a follow up.  I have managed to get all the bots to now work correctly by ticking the Wait for execution to complete option.

scott192_0-1704387718610.png

For some context as to why I did not have this ticked in the first place, it is because there was a problem passing return variables from Appscript Tasks if this option was ticked.  This is the big support ticket I had where I had to prove that the values returned were being lost and jumped through many hoops with support to prove this.  The outcome from that support exchange was to be told to turn off that option and it would work...which it did!  But obviously there was a problem that had to be fixed.

This afternoon I went back and turned the option on for bots where I had Appscript Tasks returning values and was pleasantly surprised to see that the problem with disappearing values was fixed and, even more so to see that the problem with USEREMAIL() not evaluating was also fixed!

This now makes this post redundant in terms of reporting a bug.  However, it does showcase something that I believe a lot of users have noticed about the support system we have here in the community.  This is the lack of communication between the dev team and us the users/creators.

At this time there is STILL no method to see any tracked or reported bugs that are being worked on for Appsheet.  This functionality is available in the 'Google Issue Tracker' for a number of other Google projects and is carefully maintained and easy to check status of reported bugs etc.

Obviously the regular release notes section provides some feedback, but the stated bug with disappearing values I could not see anywhere and the fact that it has been fixed now was not communicated back to me.

So, I am happy that my bots now work, but there has to still be an underlying problem if the evaluation of USEREMAIL() fails if the 'Wait for execution to complete' option is OFF and other triggered bots fail...it's a strange bug to be sure, but still!

 

View solution in original post

5 REPLIES 5

Aurelien
Google Developer Expert
Google Developer Expert

So I must come back to this post and write a follow up.  I have managed to get all the bots to now work correctly by ticking the Wait for execution to complete option.

scott192_0-1704387718610.png

For some context as to why I did not have this ticked in the first place, it is because there was a problem passing return variables from Appscript Tasks if this option was ticked.  This is the big support ticket I had where I had to prove that the values returned were being lost and jumped through many hoops with support to prove this.  The outcome from that support exchange was to be told to turn off that option and it would work...which it did!  But obviously there was a problem that had to be fixed.

This afternoon I went back and turned the option on for bots where I had Appscript Tasks returning values and was pleasantly surprised to see that the problem with disappearing values was fixed and, even more so to see that the problem with USEREMAIL() not evaluating was also fixed!

This now makes this post redundant in terms of reporting a bug.  However, it does showcase something that I believe a lot of users have noticed about the support system we have here in the community.  This is the lack of communication between the dev team and us the users/creators.

At this time there is STILL no method to see any tracked or reported bugs that are being worked on for Appsheet.  This functionality is available in the 'Google Issue Tracker' for a number of other Google projects and is carefully maintained and easy to check status of reported bugs etc.

Obviously the regular release notes section provides some feedback, but the stated bug with disappearing values I could not see anywhere and the fact that it has been fixed now was not communicated back to me.

So, I am happy that my bots now work, but there has to still be an underlying problem if the evaluation of USEREMAIL() fails if the 'Wait for execution to complete' option is OFF and other triggered bots fail...it's a strange bug to be sure, but still!

 

Roderick
Community Manager
Community Manager

@scott192 thanks for the update! I'm glad it worked out on your end! The detailed context is really helpful in case others run into similar issues. 

@scott192 thanks for posting this. I'm struggling to find the for 'Wait for execution to complete?'. Where is it?

Thank you!

scott192_0-1704461651156.png

Wait for Execution to complete will not appear in the options unless 'Trigger other bots' is turned on.

Top Labels in this Space