Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 15 Oracle Analytics Lounge
- 208 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 76 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
using 'call:' inside 'if' statement

Summary
using 'call:' inside 'if' statement
Content
I'm having some troubles with the syntax for the code below. The code is embedded in a field within a .rtf.
I have an alphanumeric that I am doing a 'to_number' in order to do a comparison. Everything works fine if I use text in the 'then' statement. The code breaks down when I try using <?call:jack?> rather than text.
Works:
<?xdofx:if to_number(TOTAL_AMOUNT) > 25000 then 'Higher' end if?>
Does not work:
<?xdofx:if to_number(TOTAL_AMOUNT) > 25000 then <?call:jack?> end if?>
Does anyone have any suggestions about what I am doing wrong? Any suggestions are appreciated.
Thanks.
Answers
-
Can you refer this
0 -
You cannot put nested <? ?> in XML tag.
The correct syntax is
<?if: to_number(TOTAL_AMOUNT) > 25000 ?>
<?call:jack?>
<?end if?>
0 -
Brajesh,
Thank you for the suggestion. I think the to_number is causing the issue here as well. Without 'xdofx' the code throws an error. If I add 'xdofx' back in, it appears to ignore the condition and always prints the <?call:jack?> image.
Any thoughts?
0 -
Thank you for your help. Unfortunately I am still getting an error. The modified code is below. Any thoughts? It feels like the 'xdofx' and to_number is what is tripping me up...
<?choose:?>
<?xdofx:when: to_number(TOTAL_AMOUNT) > 25000?>
<?call:jack?>
<?end when?>
<?end choose?>
0 -
Hi ,
to_number is xdofx function, so its mandatory to use xdofx if we to_number. And also <?call:template?> inside if is not possible because of nested xml tags (<??>)
So Please use below xsl code to achieve your requirement.
1. Create one XML placeholder tag.
2. Put the below code in the tag
<xsl:if test="number(TOTAL_AMOUNT) > 25000"><xsl:call-template name="jack"> </xsl:call-template></xsl:if>
0