IF, IF Else Condition, Case-When - In RTF Template
--------IF, IF Else Condition, Case-When - In RTF Template---------
<?if:P8_AREA!=''?>Area Name:<?P8_AREA?><?end if?>
-------------------------------------------------
----------------------IF ELSE------------------
1. <?if:dname!=''?><?dname?><?end if?> --dname is not null then show dname
2. <?if:count(cd)>4?><?end if?>
3. <?if:sum(cd/price)>100?><?end if?>
4. if country=uk multiple the price by 1.6 convert to usd.
<?if:country='uk'?><?price*1.6?><?end if?>
<?if:country!='uk'?><?price?><?end if?>
---------------------Xdofx--------------------------
1. Xdofx:if is use when we need an situation where if else can be used. for example
2. if country =uk the price*1.6 else price
3.Or if category type="cd" then display new wave else old wave
4. <?xdofx:if country='uk' then price*1.6 else price end if?>
5. <?xdofx:if ./@cattype='cd' then 'new wave' else 'old wave' end if?>
------------------------choose----------------------------
1. like case statement
2. for example when country='UK' PRICE*1.6 country='CA' PRICE*.9 ELSE PRICE
3. <?choose:?>
<?When:country='uk'?><?price*1.6?><?end when?>
<?when:country='ca'?><?price*.9?><?end When?>
<?otherwise:?><?price?><?end otherwise?>
<?end choose?>
https://www.youtube.com/watch?v=2lzEDEpqy4U
https://www.youtube.com/watch?v=PDd_HbgpVNs
-----------------------------------------------------------
Comments
Post a Comment