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.

Export XML - xsl multiple columns

Featured Replies

I am attempting to export XML and transform it - from Filemaker, to be usable in Word. For straight fields- no problem. For related data - I have it working, but once I start to attempt any sort transform, that's where I get unstuck.
I have 3 columns that I want to format as follows ( as a table - it would actually be a table within a cell - BUT, perhaps someone has a better suggestion that a table within a cell ? ):

Nr. Name    Type     Call-Sign
1   Jones     Extra    BRD2
2   Trucker   New     GF21
3    Brint      Extra    ASD2

I have got the Name column working fine... I just need the Nr. column ( position () ) and the other 2 columns to work...they always return empty....( but if I swap out their variable name with the name column it does work - so they are pulling data )
In the code that follows, Please excuse the Word mark-up...I have put the xls code in question in blue
 
<code>
<w:tbl>
<w:tblPr>
<w:tblW w:w="0" w:type="auto"/>
<w:tblBorders>
<w:top w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
<w:left w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
<w:bottom w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
<w:right w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
<w:insideH w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
<w:insideV w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/>
</w:tblBorders>
<w:tblLook w:val="04A0"/>
</w:tblPr>
<w:tblGrid>
<w:gridCol w:w="1427"/>
<w:gridCol w:w="1427"/>
<w:gridCol w:w="1428"/>
</w:tblGrid>
<xsl:for-each select="fmp:FMPXMLRESULT/fmp:RESULTSET/fmp:ROW[1]/fmp:COL[$Name]/fmp:DATA">
<w:tr wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidTr="00E337ED">
<w:tc>
<w:tcPr>
<w:tcW w:w="1427" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="000320AE" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
<w:r>
<w:t><xsl:value-of select="."/></w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1427" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="000320AE" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
<w:r>
<xsl:value-of select="fmp:FMPXMLRESULT/fmp:RESULTSET/fmp:ROW[1]/fmp:COL[$deviceEnv]/fmp:DATA" />
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1428" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="000320AE" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
<w:r>
<xsl:value-of select="fmp:FMPXMLRESULT/fmp:RESULTSET/fmp:ROW[1]/fmp:COL[$deviceEnv]/fmp:DATA" />
</w:r>
</w:p>
</w:tc>
</w:tr>
</xsl:for-each>
<w:tr wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidTr="00E337ED">
<w:tc>
<w:tcPr>
<w:tcW w:w="1427" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1427" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1428" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
</w:tr>
<w:tr wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidTr="00E337ED">
<w:tc>
<w:tcPr>
<w:tcW w:w="1427" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1427" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1428" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
</w:tr>
<w:tr wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidTr="00E337ED">
<w:tc>
<w:tcPr>
<w:tcW w:w="1427" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1427" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1428" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
</w:tr>
<w:tr wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidTr="00E337ED">
<w:tc>
<w:tcPr>
<w:tcW w:w="1427" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1427" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1428" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
</w:tr>
<w:tr wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidTr="00E337ED">
<w:tc>
<w:tcPr>
<w:tcW w:w="1427" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1427" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1428" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
</w:tr>
<w:tr wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidTr="00E337ED">
<w:tc>
<w:tcPr>
<w:tcW w:w="1427" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1427" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="1428" w:type="dxa"/>
<w:shd w:val="clear" w:color="auto" w:fill="auto"/>
</w:tcPr>
<w:p wsp:rsidR="00E337ED" wsp:rsidRPr="00E337ED" wsp:rsidRDefault="00E337ED" wsp:rsidP="00E337ED">
<w:pPr>
<w:spacing w:after="0" w:line="240" w:line-rule="auto"/>
</w:pPr>
</w:p>
</w:tc>
</w:tr>
</w:tbl>
</code>

there is a method called "walking (or looping) the portal". basically you get the position() of the first field in the portal and then each other field tests for the same postion, but also going UP to the row level (and back down to the field). I can't tell by your code what you are setting and where.

the FMP export of related fields are like this:

<ROW

<COL

<DATA

<DATA

...

</COL

<COL

<DATA

<DATA

</COL

</ROW

 

Every record (ROW) should have the same number of DATA elements for each of the related fields (COL).

 

Also, I"m not sure if you meant to say XSL(XSLT) instead of xls (which is an EXCEL extension).

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.