Jump to content
Salesforce and other SMB Solutions are coming soon. ×

The magic of our XML.Import function


Monkeybreadsoftware
 Share

Recommended Posts

  • Advertiser

A client got a bit xml file from Swiss government with a list of all registered/permitted medications. A huge XML file with thousands of entries. In order to import those easily, we use our XML.Import function in MBS FileMaker Plugin. 

We copied the XML Import example database included with our plugin to desktop. We copied the xml file to desktop and renamed it test.xml. Then we open the database and run the script. Since we didn't change it, it will simply look for a file named test.xml and import it. Since the XML file is 50 MB, this takes a while, but the XML.Import function creates 18 new tables with a lot of fields:

xmlimport1.jpg

The example has "Import2" as prefix for reasons, but you can change that. We got over 130000 records created within a minute.

The client asked how to get the ID from preparations into the other tables like the Pack table. But then we surprised our client with the magic of FileMaker's relationships. We connect the right parent entries to the UUID field of the parent table. Once all tables are moved in place and all connections are made, the graph looks like this:

xmlimport2.jpg

As you see limitations table got duplicated, so we can connect it both to preparations and packs.

Once this is setup, we create layouts. A layout for a pack can now show fields from preparation to show which preparation it belongs to.
Also via all that relationships, the table for a preparation can show the first pack, substance and price on the same layout.

Let us know if you have questions and enjoy the magic of those functions.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use