August 27, 20178 yr Hi All, Happy Sunday! I'm trying to build a layout that contains 5 containers so my employees can drag and drop XML files into each container and then I can run a script to export those XML files and import them into my filemaker database. I'm struggling to get the data exported from the containers and imported back. What is the best way to do this? Export container via $path then import $path file? Thank you so much in advance.
August 28, 20178 yr That's the basic mechanism: export field contents to a known location (you set that, variable or otherwise), import from that same known location.
August 28, 20178 yr 21 hours ago, wattmhite said: I'm trying to build a layout that contains 5 containers so my employees can drag and drop XML files into each container and then I can run a script to export those XML files and import them into my filemaker database. I'm struggling to get the data exported from the containers and imported back. What is the best way to do this? Export container via $path then import $path file? With FM 14 and up, I believe, there may be another way that does not involve a round trip to the filesystem. Create a text field and use base 64 functions to get at the text from the file in the container field. You can test by setting the text field to with this: Base64Decode ( Base64Encode ( your_containter_field )) This should work if your text files in the containers are not text encoded that might throw this off. Hope this helps, Mike
August 28, 20178 yr 7 minutes ago, Mike Duncan said: use base 64 functions to get at the text from the file Getting at the text in a file and importing it are two very different things. Especially if the "text" is XML.
August 28, 20178 yr But it's still a valid approach. Not everyone is good at writing an XSLT to import the XML; some prefer to use the FM text parsing functions to get through the XML. I've done both, depending on the complexity of the XML document.
August 28, 20178 yr 12 minutes ago, Wim Decorte said: some prefer to use the FM text parsing functions to get through the XML I strongly advise against that. In fact, strongly is not strong enough. XML cannot be parsed reliably as text.
Create an account or sign in to comment