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:
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:
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.