2 Replies Latest reply: Dec 15, 2011 1:12 AM by 905478 RSS

    Working with xdofx:if and xdoxslt variable error

    886414
      Hi,

      I have defined the variable counter in rtf template as <?xdoxslt:set_variable($_XDOCTX, ‘counter’, 1)?>

      then in loop I have incremented the counter by 1 as follows
      <?xdoxslt:set_variable($_XDOCTX, ‘counter’, xdoxslt:get_variable($_XDOCTX, ‘counter’) + 1)?>

      Now in loop i want to print some value if counter = 3. I gave following command

      <?xdofx:if xdoxslt:get_variable($_XDOCTX, ‘counter’)=3?>
      'Item is valid'
      <?endif?>

      When I try to execute above code it get executed but it's printing 'Item is Valid for all counter. It should print only when counter value = 3.

      Any idea what is error here.

      Thanks