Hi All,
I am just stuck on syntax for some of the list functions.
I use Flatten, Last or First all the time by just using an expression node and something like this:
expression1.Flatten() or expression1.Last() or expression1.First() where I have an array or List in expression 1.
I would like to use RemoveDuplicates and in the help file it indicates the syntax as object[] RemoveDuplicates(object[] list) similar to Flatten object[] Flatten(object[] list)
However trying the same approach
expression2.RemoveDuplicates() gives me an error: "unevaluable('You may not modify this object')
Just wondering what I have wrong.
Thanks
Wayne
Hi Wayne,
I believe the first object[] is the data type that the function RemoveDuplicates will return, whilst the second object[] within the parenthesis is the argument being passed.
Try using RemoveDuplicates(expression1), where expression 1 is the list you wish to remove the duplicates from.
Hope this helps.
Rob
Answer Verified By: Wayne Dickerson
Hi Rob,
I must be half asleep. I thought I had tried all the possibilities but you are correct.
Works perfectly
Thanks for the quick reply