Report to include Internal Notes
I'm trying to modify an existing report (Order Summary) to include a column with any internal notes associated with orders. So far I've been trying to pull code from the Single Scan invoice to target the notes but I can't get them to show. I'd appreciate any help or instruction. This is what I have so far:
<td style="{$summaryDetailContentStyle};">
<xsl:variable name="order" select="Customer/Order" />
<xsl:for-each select="$order/Note[Visibility='Internal']">
<xsl:value-of select="Text" />
<br />
</xsl:for-each>
</td>
-
Hello Dave-
Thanks for reaching out! We just have to change your code a bit to get the notes to appear. Try:
<td style="{$summaryDetailContentStyle};">
<xsl:for-each select=".//Note[Visibility='Internal']">
<xsl:value-of select="Text" />
</xsl:for-each>
</td>Please let me know if this works for you!
-
Thanks again, Emily. I got it worked out. I missed that I was already in "Customer/Order" from earlier in the code so selecting it again wasn't getting me anywhere (big "duh" moment). I kept the variable because it's common among most other native reports, and the line break because it helps separate notes if there are more than one. Here's the final code that worked:
<td style="{$summaryDetailContentStyle};">
<xsl:variable name="order" select="Customer/Order" />
<xsl:for-each select="$order/Note[Visibility='Internal']">
<xsl:value-of select="Text" />
<br />
</xsl:for-each>
</td>
Please sign in to leave a comment.
Comments
4 comments