Unintuitive If() behaviour

Current Behaviour:
a!localVariables(
  local!test: {},
  if(
    condition: local!test > 0,
    valueIfTrue: {
      "My First Message",
      "My second Message",
      "My third message"
    },
    valueIfFalse: "My false Message"
  )
)
Given the above code when the local!test value is {1} the output is {"My First Message"}
when the local!test value is {1,2} the output is {"My First Message", "My second Message"}
when the local!test value is {1,2,3,4} the output is {"My First Message", "My second Message", "My third message", "My First Message"}
If you set the condition to be local!test < 0 you will see similar unintuitive behaviour.
Expected behaviour: an error to be thrown stating that you can not do a comparison between a value and a list.

  Discussion posts and replies are publicly visible

Parents Reply Children