Oct 29, 2020 01:25 PM
hoping for some help/feedback on the following error. below the error i’ve pasted the portion of my script getting the error. The script was copy/pasted from a scripting block into an automation script. i ran a compare and the script is identical to the scripting block script:
TypeError: Invalid arguments passed to output.set(key, value):
• value should be a JSON-serializable type, not undefined
21 const query = await new_submissions.selectRecordsAsync();
22 if(query.records.length === 0) {
23 output.markdown(“No submissions to load. Done.”);
24 return;
25 }
26
27 output.markdown(Found *${query.records.length}* submissions
);
28 for(var i in query.records){
29 let r = query.records[i]
any help would be appreciated
Oct 29, 2020 02:43 PM
Unfortunately, the automations don’t allow any of the output functions to work. Automations run in the background of your base, meaning that you won’t see these automations running, and therefore wouldn’t see any messages associated with the script running.
If it’s a matter of testing your script, you can still use console.log() in order to see the results of different parts of your script.
I would suggest, removing the output functions and keeping only the portions of your script that make changes to your base.
Hope this helps. Good luck!
Oct 29, 2020 04:33 PM
helps a ton. Thanks Sam!