i'm currently facing an issue where i need to increment a variable based on a few checks:
I have the following code with the checks and calculations:
<xsl:variable name="HBB_Nord_Counter" select="0" />
<xsl:variable name="HBB_N_Check">
<xsl:choose>
<xsl:when test="($MUC_HBB_Answered_N_WG_1 = '0') or ($MUC_HBB_SL_N_WG_1 = '0') or ($MUC_HBB_Entered_N_WG_1 = '0')">0</xsl:when>
<xsl:otherwise>
<xsl:value-of select="($MUC_HBB_Answered_N_WG_1 * number(translate($MUC_HBB_SL_N_WG_1, ',', '.'))) div ($MUC_HBB_Entered_N_WG_1)" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
and I have build an if statement where my variable is incremented based on the above mentioned:
<xsl:variable name="HBB_Nord_Counter_2" >
<xsl:choose>
<xsl:when test="$HBB_N_Check > 0">
<xsl:value-of select="$HBB_Nord_Counter + 1" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$HBB_Nord_Counter" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
Now the question:
How can i include the second portion of the code in the first part of the code, so that my variable: HBB_Nord_Counter is incremented by one if the conditions in the second code are met.
I need this variable to divide a sum against it, depending on how many values are greater than 0.
I hope this is understandable enough.
Best regards, Ionut Sanda