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.

Importing the same field several times

Featured Replies

Hey there,

I am trying to import data from a German library format ("MABxml") via XML into my FileMaker solution. The original format uses fields and subfields, but it seems that this is a problem I've solved; the import works fine.

However, the original format also uses the same field multiple times with different values. In the attached xml-file it is field #902 that appears twice in one of the records. I cannot find a way to solve this; ideally, the result would be that the import delivers field #902 with two values. Or do I need to merge this fields first, before importing?

Any hint is appreciated.

Mike

DNB_Field_902_twice.xml.zip

DNB_Field_902_twice.xsl.zip

ideally, the result would be that the import delivers field #902 with two values.

Ideally, multiple values would be imported as individual records into a related table. But if you want to stick them into the same field, try:


...

















...

Edited by Guest

  • Author

Thank you very much! Works very well.

Ideally, multiple values would be imported as individual records into a related table.

Not sure if this is necessary in this case. I have to merge certain fields anyway, as the structure of my Filemaker file is much simpler than the original format.

The only annoying thing that is left at the moment is that the original format uses multiple attributes, e.g.

saint

dictionary

So, I am running into the problem of not being able to tell Filemaker the difference. I tried simply

...



...



...



...



...

but this seems to be not the way to do it. I'd be grateful for advice.

I am not sure what's necessary either - but I do know that ideally it's one fact per field.

the original format uses multiple attributes

Try:






...

Note:

In the METADATA section, you can name your fields whatever you like.

  • Author

Hey comment,

Thanks so much for this! Works exellently.

Mike

  • Author

...one more thing to mention: In my first message I stated that the subfield issue seems to be solved with the way I wrote the XSLT:


...





	

		

			

			

			

		

		

		

	





...





I found out that this is not quite true. In case an element and its subelements are completely missing the order of the following elements gets messed up. What works though is this way here: 





...





	

		

		

		

		

		

	





...





Attached are the two XSLTs, in case anybody wants to try...



As I can only attach two files per message, here is the XML I tried the attached XSLTs with: 





<?xml version="1.0" ?>





	

		

			green

			yellow

			blue

			white

		

		Cat

		Rose

	

    

	

		Dog

		Lilly

	



	

		Sunflower

	

        

(Background: The bibliographic records I got from a library have many empty fields. In case a field is empty, the record does not show the element at all.)

Missing_Subfields_xslt_bad.xsl.zip

Missing_Subfields_xslt_good.xsl.zip

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.