todate() function returning wrong result in expression rule

Hi All,

We have just upgraded to Appian 20.4. I am not sure if the issue due to this but facing very strange scenario when using todate() function in an expression.

todate("08/01/2021")<=todate(null)  --> this expression ideally should return false, but instead returning true. It was working as expected earlier.
Please advise.
Thanks and Regards,
Diksha

  Discussion posts and replies are publicly visible

Parents
  • Hi All,

    despite the fact what we would expect as a result out of this expression. I can confirm the behavior: in version 19.4 it renders to 'false' in version 20.4 the expression renders to 'true'.

    I guess we have to evaluate our application code for the cases were a null would be passed into the 'todate' function and check if some decisions or branching is based on that. 

    Would be nice if the Appian Product Team could shed some light on it about their thought process. 

  • 0
    Certified Lead Developer
    in reply to juergeng393

    I'm in 20.4 and I can confirm that tointeger(todate("08/01/2021")) returns a value of "-4901".  (I'm curious what it results in 20.3 or earlier.)

    So if the comparison operator assumes "null" has an inherent integer value of zero, then the current result is as expected.  However in the past I've found that using any such value comparison against NULL values is unpredictable and not recommended.

Reply
  • 0
    Certified Lead Developer
    in reply to juergeng393

    I'm in 20.4 and I can confirm that tointeger(todate("08/01/2021")) returns a value of "-4901".  (I'm curious what it results in 20.3 or earlier.)

    So if the comparison operator assumes "null" has an inherent integer value of zero, then the current result is as expected.  However in the past I've found that using any such value comparison against NULL values is unpredictable and not recommended.

Children