March 21, 200421 yr How about having a script create a record with the field names in it, having the found set sort so that the "header" record is first, and then exporting. The script could then delete the header record.
March 22, 200421 yr - make new record set serial number (or sort field) to -1 go to field (first field on layout) loop insert calculated result, Status(CurrentFieldName) go to next field exit loop if Status(CurrentFieldName) = (Nameof lastField on Layout) end loop sort records export records search for serial# =-1 delete record show all records ... If you export calculated fields, modify the calc as follwows: if(serial#=-1, "Fieldname"; your calculation ...) ForDate, Number and Time fields, you may have to create a text calc if(serial#=-1, "Fieldname"; Date2Text(your date field) ...) However, I'd rather do it more elegantly with XML. You cannot export repeating fields with XML because the Character ASCII 29 is not allowed in XML. <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE stylesheet [ <!ENTITY TAB "	" > <!ENTITY CR " " > ]> <xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:fmp="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fmp"> <xsl:output method='text' version='1.0' encoding='iso-8859-1' indent='no'/> <xsl:strip-space elements="*"/> <xsl:template match ="/"> <xsl:apply-templates select="//fmp:FIELD" /> <xsl:text>&CR;</xsl:text> <xsl:apply-templates select="//fmp:ROW" /> </xsl:template> <xsl:template match="fmp:FIELD"> <xsl:if test="not(position() = 1)"> <xsl:text>&TAB;</xsl:text></xsl:if> <xsl:value-of select="@NAME"/> </xsl:template> <xsl:template match="fmp:ROW"> <xsl:apply-templates select="fmp:COL" /> <xsl:text>&CR;</xsl:text> </xsl:template> <xsl:template match="fmp:COL"> <xsl:if test="not(position() = 1)"> <xsl:text>&TAB;</xsl:text></xsl:if> <xsl:apply-templates select="fmp:DATA"/> </xsl:template> <xsl:template match="fmp:DATA"> <xsl:if test="not(position() = 1)"> <xsl:text><![CDATA[|]]></xsl:text></xsl:if> <!-- repeating field separator ASCII 29 is not allowed! --> <xsl:value-of select="."/> </xsl:template> <xsl:template match="text()"/> </xsl:stylesheet>
Create an account or sign in to comment