Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

exporting a header for tab files

Featured Replies

anybody have a trick on how to export a header with the tab files?

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.

- 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 "&#09;" >

<!ENTITY CR "&#13;" >

]>

<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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.