Export Records can export XML. But it exports all records in your found set so to export just one record, you need to isolate that one record in a single record found set.
When you set up export records, you can set it up to refer to a variable instead of an explicit filepath and file name.
You can thus use set variable to set a $Path variable to the file path and file name--which can refer to your text field in order to name the file.
For more on $Path variables and the script steps that can use them: Exploring the use of a $Path Variable in Scripts
Thanks for the Path variable demo, so far I got that to work.
The challenge I'm facing now is simply going through each record, one by one, and isolate them for the export. I can isolate one asset, but I can't move to the next one in line (such as Go To Record with the NEXT option) and isolate that asset, then so on and so forth.
Unless there's an easier way, maybe open up second window, isolate, export, close window. Go to next record, open up second window, repeat. I would make the layout for export only contain the fields needed
Awesome - that worked! Last thing. It seems on my XML export settings have to be confirmed every time during export, even though they are set in the script. Is there any way to avoid that?
It asks me to specify the XML and XSL Options and Field Order for each export, even though I already did that.
Did you select the "perform without dialog" option for Export Records?
And alternatives to two windows:
Create a second layout based on a different table occurrence (box in Manage relationships) that refers to the same base table (also called a data source table). The found set on each layout is then independent and you can use one layout for your found set of records to export and the other to isolate one record at a time for the export.
Just capture the Unique ID's of each of your records in the initial found set in a variable. The "list of" summary field in FileMaker 13 or later comes to mind as a simple way to get that list to set a variable. Then you loop through the values in the variable instead of looping through records in a found set.