Thursday 5 May 2011

if - else condition in XML Publisher

Here is a small snippet of XML tags which tells you how to add  if - else condition in XML Publisher RTF template.


Syntax for the same :


<?xdofx: if PRICE ='N' then '' else if DISCNT !='' then DISCOUNT else DISCOUNTAMT end if?>

Here:

  • xdofx is for Extended function syntax.
  • DISCOUNT and DISCOUNTAMT are the XML tags, which displays the values accordingly based on the if - else condition.
The same can be modified according to the requirements.


Hope this helps.

Please feel free to comment.

1 comment:

  1. But it is showing that it will have length constarints as i am not able to put more conditions it is not allowing me to enter

    ReplyDelete