cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Way to pass an array to a global script function

marco_jehle
Explorer
0 Likes
2,138

Hi everybody,

Within Lumira designer I'm trying to pass an array to a global script function as an input parameter, but I don't find an possibility to set the parameter as an array.

There are two workarounds I can think of:

1.) passing a string separated by comma and rebuilt it, but then I also have to create this string when calling the function.

2.) create a global variable as an array and adress it. But in my opinion this is not a good way to code.

Do you have any ideas on this?

View Entire Topic
reiner_hille-doering
Product and Topic Expert
Product and Topic Expert
0 Likes

To create a typed array, you must fill it with something - else the type system can't detect the type. Afterwards you can remote the unnecessary content:

var iconArray = [ICON_1]; // Initialize the array with dummy entry of correct type
iconArray.pop();

The same trick works for all typed array - as long as you have at least one sample element.