Skip to main content

I think this is a new issue, but now when I try to return an array (as a list) from an Automation, the value is empty. If I convert it to a string, it returns the string value (see code and output below).

The array looks ok in console.log(). It’s just a series of ID numbers.

 

 

 

Hm, as a datapoint this seems to work fine for me:


It should work.

 


Try to use slice function on array to cut part of it
let arr2=arr1.slice(0,5)
or try simple filtering
let arr2=arr1.filter(Boolean)

i tried to use  JSON.stringify(arr) - it creates a string like ,toString but with square brackets.
the difference is when you output array as array, it can be used for repeated group, string - cannot.


Hi ​@mpalsf , Airtable’s output.set() can only serialize some types of data. Most likely your array is not a pure string array, but instead it might be an array of objects. The additional object metadata is probably what is causing the issue with showing this in the output.set(). If you share more of your code or a console log of the rtnArray, I can be more sure about the issue and can help you with some tweaks in your function to just get an array of IDs. Hope this helps!


Reply