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" ) )
Discussion posts and replies are publicly visible
Not sure what you think this "and()" is doing.
What do you try to achieve?
Trying to achieve a simple logic, if there is a non zero value and local!Torerance_Name is mean "Mean" then some logic.The output must be uniform, I can't find any logic behind this different output. Is it an Appian bug?
The and() function expects a list of boolean arguments. Neither the text value "15.0" or "8.2" are boolean values. My guess is that when the and() function is typecasting both of these to boolean, it gets as far as seeing that "15.0" starts with "1", which aliases to a value of "TRUE" in most contexts, and thus casts it as "TRUE"; and likewise when it sees that "8.2" does not start with "1", it gets cast as "FALSE".
Any chance you tested this out?
So to answer your first question: no, it's not an Appian bug.
To echo Stefan as usual, what are you trying to achieve when you put the "15.0" and "8.2" text values in this rule? If I could tell what your intended rationality was I'd love to help you come up with the appropriate expression, but I'm struggling to understand.