Result of wherecontain() changed in if()

Weird thing happened, I have a if() function

if(
    my condition,
    value when true,
    remove(local!myList, wherecontains(cons!code, local!myList.code))
)

when I take the remove() out of if(), it's result is a list of 4 items, but in if(), it's result is a list of 1 item

And I tried with wherecontains(), when it's a standalone out of if(), the result is List of Number (Integer) - 0 items, but in if() the result became 

But why would this remove 3 items from myList?

  Discussion posts and replies are publicly visible

Parents Reply
  • 1. When wherecontains() in if(), and condition value is false

    2. When where contains() not in if()

    3. Value when true in if(), not used in this case anyway

    4. Combined with remove() - expected value

    5. When it's in if(), the remove() result is not correct

    In if() condition my colleague added a condition, see commented out lines, and it worked. But I can't see why the added condition change the result because condition 1 is false anyway

Children