November 10, 201114 yr I guess the question is any ideas on how to change this so that if an exported field is empty I don't get an extra $newrecord but do still get the $newrecord needed at the end of each record??? Note: setting Qu to '0' if empty is not an option.... Example: ItemName Price Qu Product1 $9.95 Product2 $7.95 Product3 $8.95 This may not show but there is a tab after each price before the return/new line Yet I get: ItemName Price Qu Product1 $9.95 Product2 $7.95 Product3 $8.95 Here's the stylesheet section....... <xsl:choose> <xsl:when test="position()=last()"> <xsl:value-of select="fmp:DATA"/> <xsl:value-of select="$newrecord"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="fmp:DATA"/> <xsl:value-of select="$delimiter"/> </xsl:otherwise> </xsl:choose> Thanks to anyone who can help.....
November 10, 201114 yr Please post your entire stylesheet. An example source file would be also helpful.
November 19, 201114 yr put an xsl:if around the xsl:choose. test for != '' (xsl:if test="fmp:DATA != ''") or actually you want to make it another xsl:when in the xsl:choose, so that you can also test for the last record (even if empty, add the $newrecord...) when fmp:DATA = '' AND last record, $newrecord when fmpDATA != '' AND last record, $newrecord otherwise, $delimiter Maybe the entire XSLT would help??
November 19, 201114 yr Author Sorry people ..... I've been sick and out of it for a while. Just now catching up on things.... Maybe the entire XSLT would help?? I'm just using the basic FMP example, with a little editing, which I posted on another topic.: http://fmforums.com/...__fromsearch__1 I'll see how this works and repost here if it does.... Thanks Beverly EDIT : I go back to test it and it's working fine WITHOUT changing the xsl ..... huummmmmm. EDIT#2 : You gave me an idea that actually would help me a lot ...... what if all three fields were empty, or basically an empty record?
November 19, 201114 yr I'm just using the basic FMP example, with a little editing, which I posted on another topic. Are you sure the double returns appear only when the last field is empty?
November 19, 201114 yr when fmp:DATA = '' AND last record, $newrecord when fmpDATA != '' AND last record, $newrecord otherwise, $delimiter :Ask:
Create an account or sign in to comment