Hello makers! Need a bit of help with taking one value from an array.
This is the data in the array, and I only need to take the 2nd value and carry it over the whole scenario, but the value I want to take isn’t always in the 2nd value, it’s sometimes in the 3rd, 4th etc. And the number of values in the array also differs.
I was thinking I can set a condition to measure the length of each value in that array and take the shortest one (It’s always going to be the shortest one, but I’m not sure how the logisitics would work for that. Need help, thank you!
1 Like
Hi @Multiply_Advisors
You will need to iterate the array and then use numeric aggregator and select the minimum value.
Regards,
Msquare Automation - Platinum Partner of Make
@Msquare_Automation
1 Like
@Msquare_Automation, Does the minimum value check only for the length of the string ? What happens if one of the values is an actual number, but greater length than every other string ?
1 Like
Hey @kudrachaa
We suggested this as you mentioned - “(It’s always going to be the shortest one, )”
If it can be any length, then you should analyse the pattern and find something unique that other’s value can have but not the one you need.
Regards,
Msquare Automation - Platinum Partner of Make
@Msquare_Automation
@Msquare_Automation, Hm I think you misunderstood. I’m just curious about how ‘minimum value’ works - does this check min. length of a string in an array or a minimum value (numerical) in an array? I assume this solution works for min. length, but what if there are numbers (numerical var) in the array, too?
1 Like
This works with numbers. That’s why we suggested to use length() function while mapping the value from iterator inside aggregator. @kudrachaa
Regards,
Msquare Automation - Platinum Partner of Make
@Msquare_Automation
@Msquare_Automation Oh okay, don’t see length() function mentioned anywhere in the topic. I missed that part and thought it was weird.