FMDiff™

FileMaker Business Alliance


This site is W3C compliant:
Valid XHTML - Valid CSS
Last modified May 23 2010, 04:00:29 CEST.

Export a list of all fields of a table

Perform an XML export and use this style sheet.

Applicable with FileMaker® Pro 6 and up.

Download example style sheet exportfields.xsl.zip 0.8 KB

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:fmp="http://www.filemaker.com/fmpxmlresult">
  <xsl:output method="text"/>
  <xsl:variable name="newline" select="'&#10;'"/>
  <xsl:variable name="tab" select="'&#9;'"/>
  
  <xsl:template match="/">
    <xsl:for-each select="//fmp:METADATA/fmp:FIELD">
      <xsl:value-of select="@NAME"/>
      <xsl:value-of select="$tab"/>
      <xsl:value-of select="@TYPE"/>
      <xsl:value-of select="$tab"/>
      <xsl:value-of select="@MAXREPEAT"/>
      <xsl:value-of select="$newline"/>
    </xsl:for-each>
  </xsl:template>
  
</xsl:stylesheet>

You will get a tab-delimited list with field name, field type, and number of repetitions. To speed up the process select only one record for export - no data will be exported anyway.

If you just need the name, reduce the middle part to

      <xsl:value-of select="@NAME"/>
      <xsl:value-of select="$newline"/>


Examples are provided "AS IS" without warranties of any kind. Use at your own risk.

Copyright © 2005 - 2010 Huslik Verlag GmbH. All Rights Reserved. FMDiff and FMChecker are trademarks of Huslik Verlag GmbH, Augsburg, Germany. FileMaker is a trademark of FileMaker Inc., Santa Clara, CA, USA. Other trademarks mentioned are property of their respective owners. This web site has not been authorized, sponsored, or otherwise approved by FileMaker, Inc.