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.

Repeating fields import from FMPXMLRESULT in FMP6

Featured Replies

How can i import XML data into repeating fields in FM6? I was able to export repeating fields to XML in FMPXMLRESULT grammar, and it looked like this:


...

  <RESULTSET FOUND="1">

    <ROW MODID="1" RECORDID="1">

      <COL>

        <DATA>some data</DATA>

        <DATA>different data</DATA>

        <DATA></DATA>

        ...

      </COL>

    </ROW>

  </RESULTSET>

...



But i wasn't sure of its usefulness.  Additionally, immediately after exporting this file (without a stylesheet) i try importing it (again, without a stylesheet--no transformation is needed, because it's FM's native grammar, right?) and wind up with only the first repetition populated, with data from the first <DATA> element.



My issue is that i have other (non-FM) XML that looks like:



...

<elementtypeA>

  <elementtypeB>some data</elementtypeB>

  <elementtypeB>different data</elementtypeB>

</elementA>

...

And i want to import each of the elements <elementTypeB> into one repeating field, so that the first repetition contains "some data" and the second repetition contains "different data." But before i can get to writing an XSLT, i need to understand how FMPXMLRESULT imports repeating fields.

Any ideas on where to look for examples of such a feat? FM's documentation claims that repeating fields can be used with XML, but does not explain how.

Jerry

But before i can get to writing an XSLT, i need to understand how FMPXMLRESULT imports repeating fields.

It is not possible to import data into other repetitions than the first.

FMP will export a repeating list correctly, but will bring in only the first data element on import.

  • Author

Thanks, Jean-Marie. I was afraid that would be the answer. You don't, by chance, have any strategies for working around this issue, do you? I'm thinking of something along the lines of somehow combining all the sibling elements prior to the import, and separating their values with some sort of delimiter. This is not ideal, though, as the values i would be combining may be very long text strings in some cases.

Do you know of any better ways than this?

J

"separating their values with some sort of delimiter"

Considering an xml :

attachment : repeating.xml

(sorry, the "code" UBB Code will not work for me)

the xsl :

attachment: repeating.xsl

In FileMaker this will be 2 records, 1 field (element).

Field element of record 1 = "some data

repeating.zip

  • Author

Swift. Thanks again!

J

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.