Accessing array elements in a condition

My use case:

  • Run connector function to return an object array
  • Use the handy MAP_TO_X functions to separate the object array out into simpler arrays
  • Run 6 triggers (a FOR loop sure would be nice :grin:) to make decisions based on a boolean value in one of the simple arrays (“isActive”)

My ‘issue’ is that I can’t access the individual elements of the array from the condition and instead have to use a separate set of 6 triggers to ‘Get from index’ the simple array values in to non-array datatypes in order to evaluate them. If I could just do something like ‘Variable.My Array[0]’ it would eliminate those latter 6 triggers, as well as all of the non-array variables. I’m looking at 24 variables for the 4 arrays.

Am I missing some functionality somewhere that might make this easier?

Hmmm. Have you tried using the for loop “hack”? Where you switch back and forth between 2 steps using “step open” triggers to iterate through the array?

That is the current most popular way to implement “for” loops until we develop this capability natively. It sounds like this would be the best way to solve it.

Haven’t tried it yet but don’t think it would be great for this application. I can make it work with the individual variables for now. Thanks!