1 Reply Latest reply on Dec 10, 2012 8:25 AM by AlexAnd

    XDOFX if-then-else command testing of space and numeric value


      I have the following xdofx statement in a RTF template to display the value of one variable or another, depending on the value it contains: (the variable can contains both space or null or a numeric value).
      <?xdofx: If Amount_1 = " then 'display amount_2' else If Amount_1 = 0 then 'display amount_2' else 'display Amount_1' end if?>

      Result: When Amount_1 variable contains space or null value, then this If-then-else statement works. But When Amount_1 contains a number such as 0, it gives error "SBL-OMS-00203" (when it's checked against [=" ] in If condition). What's causing this? Is XDOFX being confused to test a variable that supposedly a character string (default by testing against [ =" ]), but find a number in the variable?

      Any work around solution? (So [=" ] and [=0 ] can both be specified against a variable in an if-then-else statement in XDOFX).

      Thanks a lot.