okay. This was just a test because I encountered the issue with a significantly more complicated type and I just made this to test if I could get a list of simple numbers, but I’ll doing what you suggested now.
So “list_of_numbers:each item number:formated as text is not possible
list_of_numbers:formated as text is not a list but I can pass it into the single parameter options and make it back into an array. It would be nice though if I could use the lists, because that’s going to be hard for my more complex types.
nope that’s for the single items. What you’re seeing there is a single string. I’m trying to get values out of the thing list below. Which I can do when using this on the front end but not on the back end.
The examples wrap the result in JSON.stringify because the output is put onto a text group.
// list of numbers in thinglist1
// list of numbers does not have listProperties
var len = properties.thinglist1.length();
var result = [];
for await (const item of properties.thinglist1) {
result.push(item);
}
return (result); // result is array of numbers
// list of books in thinglist1
var len = await properties.thinglist1.length();
var result = [];
for await (const item of properties.thinglist1) {
// result.push(item.listProperties());
result.push(await item.get("title_text"));
}
return (result); // result is an array of titles
The docs did not cover this adequately, I’ll update them.
I’ve updated the docs, added another example to the section params-bubble
(The cached time on the docs CDN is kinda long, to refresh the page cache: open the site, turn off network, refresh page to get error, turn on network, refresh page and should be the new one not the cached one)
I also added another workflow “list of books categories” in example app editor
var len = await properties.thinglist1.length();
var result = [];
for await (const item of properties.thinglist1) {
// result.push(item.listProperties());
result.push(await item.get("title_text"));
var cat = await item.get("category_custom_category");
// result.push(cat.listProperties());
var catname = await cat.get("name_text");
result.push(catname);
}
return result; // list of text