Hi Team,
Got confused while doing some calculations in Appain Expression rule. Added input and output below. i have tried fn!union() function but it was failing sine input was only one array.
Code: fn!union({ 1, 2, 2, 1, 3, 1, null, null }, {})
Sample i/p -> { 1, 2, 2, 1, 3, 1, null, null}
Expected o/p -> { 1, 2, 3}
Current Appian Design:
Thanks and Regards,
Vigneshkumar Radhakrishnan
Discussion posts and replies are publicly visible
if I understood your query correctly, you want to fetch distinct values from a list and remove null values.
In that case, you can use union using same list twice and pass the output in reject().
Something like:-
a!localVariables( local!a : {1, 2, 2, 1, 3, 1, null, null }, reject(fn!isnull,union(local!a,local!a)))