Today I found a problem regarding evaluation of logical functions and boolean va

Today I found a problem regarding evaluation of logical functions and boolean variables with null values. The function "and(null())" evaluates to "true", "or(null())" evaluates to "false" and "not(null())" tells me that null parameters are not allow. Adding some true() or false() values to the and() and or() functions return correct values.

When I bring the if() function into play which always handles null() values to false() the whole behaviour looks quite inconsistent to me. I think that "and(null())" as well as "or(null())" should evaluate to "false". The function "not()" should take null() values as "false" and for consistency "not(null())" should evaluate to "true"....

OriginalPostID-125072

OriginalPostID-125072

  Discussion posts and replies are publicly visible

Parents
  • Any Appian PV or Data Type can have a null value, so you are correct that it's not a conventional boolean.

    However, I would guess that there are a lot of processes out there that depend on null() being a different value from false. For example, before an approval PV is initialized, it's not false or true. So you might distinguish between cases that are approved, rejected, and pending.
    It's possible this is not a design best practice (I can ask Appian PS what they think) but changing the behavior here -- and making the Boolean type behave differently from all other types -- could have a lot of implications.
Reply
  • Any Appian PV or Data Type can have a null value, so you are correct that it's not a conventional boolean.

    However, I would guess that there are a lot of processes out there that depend on null() being a different value from false. For example, before an approval PV is initialized, it's not false or true. So you might distinguish between cases that are approved, rejected, and pending.
    It's possible this is not a design best practice (I can ask Appian PS what they think) but changing the behavior here -- and making the Boolean type behave differently from all other types -- could have a lot of implications.
Children
No Data