Unable to use return value from "Call a script" task in "Create a new file" task

Hi, I can't figure out why I can't use the return value from my Apps Script task directly in the expression "File Name Prefix" of my next "Create a new file" task.

I get the following error message:

Task 'Task for create-new-file' has an invalid File Name Prefix '="MyDoc_"&[call-script].[Output]'. Unable to find column 'call-script'
 
I have no issue using this return value in a "Run a data action" step, for instance.
 
Any ideas? Thanks ๐Ÿ˜€
Solved Solved
0 3 365
1 ACCEPTED SOLUTION

So looking at the documentation here https://support.google.com/appsheet/answer/12309564?hl=en, specifically at the automation limitation noted

Markus_Malessa_0-1678209051774.png

I would conclude that your current setup does not work due to the identified limitation, more specifically that you cannot pass the script return value to another task but you could pass it to an action or a conditional. So my suggestion would be if you have a column in your Clients table where you could set the value via an action, then insert that action between call-script and create-new-file and in the create-new-file task for the document prefix call the column value instead of the script return value.

View solution in original post

3 REPLIES 3

If you can share some additional details about how your task is set up? There is a toggle for calling scripts 'async' which I believe needs to be off for return values, so at the moment we might not be able to help figure out the issue without knowing some details.

Thanks for your reply.

The "Run asynchronously" property gets disabled by default when "Return Value" is enabled.

Let me share some additional details about my settings:

Screenshot 1.png

And:

Screenshot 2.png

So looking at the documentation here https://support.google.com/appsheet/answer/12309564?hl=en, specifically at the automation limitation noted

Markus_Malessa_0-1678209051774.png

I would conclude that your current setup does not work due to the identified limitation, more specifically that you cannot pass the script return value to another task but you could pass it to an action or a conditional. So my suggestion would be if you have a column in your Clients table where you could set the value via an action, then insert that action between call-script and create-new-file and in the create-new-file task for the document prefix call the column value instead of the script return value.

Top Labels in this Space