Appian expression rule strange behaviour

Certified Associate Developer

Hello,
Consider the following test code:

a!localVariables(
    local!Torerance_Name:"Mean",
    local!test_0: and(
        local!Torerance_Name = "Mean",
        "15.0"
    ),
    local!test_1: and(
        local!Torerance_Name = "Mean",
        "8.2"
    )
)


Here test_1 has value : false and test_0 has value true.
What is the cause of this? Please find the screenshot as follows:

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to Shubham Aware

    Sadly OP has seemingly no-showed this thread - I was greedily hoping for some validation on my correct answer from nearly 3 days ago Grin

    Funny, I never exactly realized that the casting works out that way for all strings beginning with "T" and "Y" as well.  It makes sense in a way of course, though in situations like the original post here, when someone wanders into a "typecast as boolean" situation with no idea what's happening or why, it can produce some truly silly results Stuck out tongue