Is there a way of creating a custom import window? I don't want to use the XML import window (what I mean is that I don't want this window to be visible to the user since the style sheet is accessible.
A scripted Import Records can have the dialog (import windows) hidden. The user need not see anything. Can you explain a little more of the process as it is now that you want to change?
Right now I have script that opens the window that says "Specify XML". I want the user to be able to import the XML file but not see the style sheet portion of the window.
So, you want to allow them to choose the source XML? is it variable by name or something that makes it necessary to show some dialog? What about the XSLT (if needed), is that the same each time?
There will be a need to show the choose function to select a XML but the XLST will stay the same.
I neglected to ask what version (& OS) you are using? You might be able to allow "selection" of the XML and place into a container field. From there, you can script the export (to a temporary path) and process based on that path. Then use the path (as a $variable in the script) for the Import Records script step. The same can be done with the XSLT (store in a container and export it to a temporary path) for use with the Import Records script step.
I am on FMP 14 Advance but do plan to upgrade to the latest at the end of the week. I am on Sierra os.
The container (for selection of the XML file) should work in FMP/A 14, but you may find FMP 16 has more features that help.
Okay. I am trying to process what you are saying. So I went into the container field and their is the storage option to store the data externally. It already noticed that the relative to path. There is an option to Secure storage or open storage. I am guessing I should put the selection on 'secure storage" instead of "open storage". I get a bit confused at the (export to temporary path). Why would I have to create an export first before creating just an import script? Thank you for all this by the way. I am learning a lot as I try to get my mind around these concepts.
Temporary path is temporary path for the exportGet ( TemporaryPath ) FileMaker Pro 16 Help
How you store the container is up to you and what you need. Do you need to preserve the XML document imported, or does it merely need to go into a container with global storage (sufficient for temporary)?
1. "import" the XML source file (place into container) with several methods
insert from url?
manually select from directory and place?
2. Then "Export Field Contents" to named temporary paths
a. the XSLT
b. the XML
3. Peform the Import Records with the same temporary paths to the XML and XSLT
The reason to "import/export/import"? Because you want the user to select a source XML file.
FileMaker Pro 16 Help
Thank you. I am going to try building this in the next few days and report back on how it is going. Hopefully it goes well.
Retrieving data ...