Categories
- All Categories
- 4 Oracle Analytics Sharing Center
- 10 Oracle Analytics Lounge
- 189 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.4K Oracle Analytics Forums
- 5.9K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 65 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Calling subtemplate gets me an error without error code

In may main template, I have the following code:
<?import:xdoxsl:///Custom/Procurement/POTemplate/filename_of_subtemplate.xsb?>
<?choose:?>
<?when:?><?xdofx:substr(Comments,1,3) = 'ORD')?>
<?call-template:P3PO?>
<?end when?>
<?when:?><?xdofx:substr(Segment1,1,3) = 'CON')?>
<?call-template:OptimusPO?>
<?end when?>
<?when:?> <?xdofx:substr(Segment1,1,3) = 'PUR')?>
<?call-template:CustomPO?>
<?end when?>
<?end choose?>
I have tested each templates and they are working as expected.
I am getting the error below when I tried using it as subtemplate
Answers
-
0
-
Hi @MandeepGupta ,
I followed the recommendation on the link you provided and still got the same error.
Thanks!
0 -
So, I think I fixed it initially by using this code:
<?import:xdoxsl:///Custom/Procurement/POTemplate/AHA_Custom_PO_PDF.xsb?loc=${_XDOLOCALE}?>
<?if xdofx:starts-with(Segment1, ‘ORD’)?>
<?call-template:P3PO?>
<?end if?>
<?if xdofx:starts-with(Segment1, ‘PUR’)?>
<?call-template:CustomPO?>
<?end if?>
<?if xdofx:starts-with(Segment1, ‘CON’)?>
<?call-template: OptimusPO?>
<?end if?>
But with the code above, the string funtions seems to be disregarded, for some reason, all subtemplates are being called.
The final fix I made was to create another column in the Data Model where it will contain the value of the first 3 letters of Segment1
<?import:xdoxsl:///Custom/Procurement/POTemplate/AHA_Custom_PO_PDF.xsb?loc=${_XDOLOCALE}?>
<?choose:?>
<?when: PO_TYPE = ‘ORD’?>
<?call-template:P3PO?>
<?end when?>
<?when: PO_TYPE = ‘PUR’?>
<?call-template:CustomPO?>
<?end when?>
<?when: PO_TYPE = ‘CON’?>
<?call-template:OptimusPO?>
<?end when?>
<?otherwise:?>
<?end otherwise?>
<?end choose?>
Also, I noticed that it only works with choose.
So yeah, this is fixed now. Thank you all!
0