Hi All,
Can you please help me how to get the intersection of Lists of array (number array). So I have a list of number array which I construct in the interface. I need to only pick the common element present in all the number array . I tried with loop and reduce function but not getting the actual result .
It has been achieved by taking an array element and loop over other other array and check if present in all array then keep it or remove it which I feel is very dirty way of doing .
Any suggestion would be appreciated.
Thanks
Manish
Discussion posts and replies are publicly visible
https://docs.appian.com/suite/help/22.3/fnc_set_intersection.html
Hi Stefan,
I have tried intersection with reduce function but not able to achieve it as list of number array generate at runtime and I am not able to pass it like an arguments.
[{1,2,3},{2,3,4},{4,5,6}]
Why do you need reduce to do that?
intersection({1,2,3,4},{2,3,4},{4,5,6})
returns 4, which is the only number present in all the arrays.
The list of Array generates at run time , How will I pass the list of array to intersection function ? , So I tried to used the reduce function to send the result of intersection for next iteration(interaction).
Manish_Kumar said:generates at run time
Can you clarify what you mean by this? What's the underlying code here?