Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 18 Oracle Analytics Lounge
- 218 Oracle Analytics News
- 44 Oracle Analytics Videos
- 15.8K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 82 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Exit from XSLT after one match is found in payment template

Hi All ,
I have a below code XSLT code , where I want to exit from the for each loop if the first match is found. The ID tag inside the for-each loop should be printed only once. the match can be found at any position, so position cannot used.
Any help is appreciated. Thanks
<DR>
<xsl:for-each select="key('contacts-by-LogicalGroupReference', concat(LogicalGrouping/LogicalGroupReference,'|',PaymentDate))">
<xsl:variable name="v_payment_type">
…
</xsl:variable >
<xsl:if test="(v_payment_type = 'X' or v_payment_type = 'Y' or v_payment_type = 'Z' )">
<ID>
…
</ID>
</xsl:if>
</xsl:for-each >
</DR>
Answers
-
Hi @AKV27
As per above code you have an for each and if loop based on the condition you are printing the ID value, How you are entering into for each is that condition always true and based on your key value? and use the else for failed condition and see are you able to exit.
Regards,
Arjun
0