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
Hi,
you want to use union() then you need to pass two parameter. and also you want to remove null values form output, then code should look like belowa!localVariables( local!input1: { 1, 2, 2, 1, 3, 1, null, null}, local!input2: { 1, 2, 2, 1, 3, 1, null, null}, reject(a!isNullOrEmpty(_), union(local!input1, local!input2)) )
a!localVariables( local!input1: { 1, 2, 2, 1, 3, 1, null, null}, local!input2: { 1, 2, 2, 1, 3, 1, null, null}, reject(a!isNullOrEmpty(_), union(local!input1, local!input2)) )