Oracle Analytics Publisher

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Exit from XSLT after one match is found in payment template

Received Response
11
Views
1
Comments
AKV27
AKV27 Rank 0 - Community Observer

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

  • Mallikarjuna Kuppauru-Oracle
    Mallikarjuna Kuppauru-Oracle Rank 8 - Analytics Strategist

    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