If-then-else not working well for comparison with 0

272 views Asked by At

I have written a rule like

if
    the period of 'Request' is more than 0
then
    set the date of 'Request' to due_date - 1 Day;
else
    set the date of 'Request' to due_date ;

for period values other than 0 it's working fine but when value of period is 0 it just skips whole rule, i.e it neither go to then nor else. I am using ODM 8.6 and testing through DVS file.

I have tried same thing in ODM 8.5 and it's working fine there please help in getting this issue resolved.

1

There are 1 answers

0
z_blue On

Did you try with the latest fixpack?

In general it is poor design for rules to use the else construct. Try to split the rule into 2 different rules:

  • for period of 'Request'>0, and
  • for period of 'Request'<0.