FMDiff™   

FileMaker Business Alliance
View Jürgen Geßwein's profile on LinkedIn

This site is W3C compliant:
Valid XHTML - Valid CSS
Last modified February 24 2016, 19:25:18 CET.

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.

© 2005 - 2015 Winfried Huslik †. © 2024 Jürgen Geßwein. All Rights Reserved. FMDiff and FMVis are trademarks of Jürgen Geßwein, 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 authorised, sponsored, or otherwise approved by FileMaker, Inc.