Calling sub-template based on some condition
Can anyone help me out how to call a sub-template based on a condition.
I have a requirement like I have some text that is in a sub-template and based on certain condition I have to select the text from the sub-template and have to concatenate the same with some plain text and some field values in my master template. I have the following code but its not working :-
<?xdofx:if instr(PAYINFO_OBJ,'cc') then Call :B1||' Visa xxxx-'||DEBIT_NUM||' exp '||substr(DEBIT_EXP,1,2)||'/'||substr(DEBIT_EXP,3,4)
else
if instr(PAYINFO_OBJ,'dd') then CALL :B||BRANCH_NO||' XXX '||DEBIT_NUM