Categories
- All Categories
- Oracle Analytics and AI Learning Hub
- 34 Oracle Analytics and AI Sharing Center
- 22 Oracle Analytics and AI Lounge
- 276 Oracle Analytics and AI News
- 47 Oracle Analytics and AI Videos
- 16.1K Oracle Analytics and AI Forums
- 6.3K Oracle Analytics and AI Idea Labs
- Oracle Analytics and AI User Groups
- 99 Oracle Analytics and AI Trainings
- 16 Oracle Analytics and AI 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
