Hi ,
I have a list of 5 text values returned by a rule like names as { "abc","def","ghi","jkl","mno" } , I want to compare a name as "def" in this list without using any loop. is there any function in Appian which can perform comparison without using any loop?
Discussion posts and replies are publicly visible
Seems like contains() is what you're looking for - https://docs.appian.com/suite/help/21.3/fnc_set_contains.html
contains({"abc", "def", "ghj", "jkl","mno"}, "def")
And if the desired result is the positional indices in the array where the target value occurs, whereContains() will work for this case. Note that I believe this function will not be any more effectively efficient than doing an a!forEach() loop, but at least it's (slightly) less code.