Thursday, August 12, 2010

RTF Template- IF Conditions



You can use IF condition directly or using xdofx in RTF Template. Below are few examples

(?xdofx:if LENGTH(/XXBRPRPOP/LIST_G_INIT_INFO/G_INIT_INFO/LIST_G_HEADERS/G_HEADERS/POH_CUSTOMER)=0 THEN 'DELIVER TO:'POD_REQUESTOR_NAME'('POD_QUANTITY_ORDERED')' END IF?)


(?xdofx:if LENGTH(/XXBRPRPOP/LIST_G_INIT_INFO/G_INIT_INFO/LIST_G_HEADERS/G_HEADERS/POH_CUSTOMER) !=0 AND(/XXBRPRPOP/LIST_G_INIT_INFO/G_INIT_INFO/LIST_G_HEADERS/G_HEADERS/POH_CUSTOMER)!=POD_REQUESTOR_NAME THEN 'DELIVER TO:'POD_REQUESTOR_NAME'('POD_QUANTITY_ORDERED')' END IF?)


(?if:string-length(/XXBRPRPOP/LIST_G_INIT_INFO/G_INIT_INFO/LIST_G_HEADERS/G_HEADERS/LIST_G_CANCEL_RELEASE/CANCEL_RELEASE_DATE)!=0?)


(?xdofx:if AMOUNT > 1000 then ’Higher’
else
if AMOUNT < 1000 then ’Lower’
else
’Equal’
end if?>


Note: Replace symbol '(' with '<' and ')' with '>' for starting and ending Tags above

2 comments:

  1. I've used DBMS_XMLGEN.getXML to generate xml, based on a query. If query returns no rows, concurrent program is showing warning. I have used IF condition in the template
    0?>

    But when xml data is not there how to put a else condition to this?

    ReplyDelete
  2. I didnt get your question clearly...If XML data source is not available, template doesnt work anywayz, no use of putting any conditions


    Amit

    ReplyDelete

Note: Only a member of this blog may post a comment.