2 Replies Latest reply on Mar 18, 2016 12:57 PM by Doug Staubach

    Add XSL file path as new parameter to "Export Records" script step

    Doug Staubach

      Export Records functionality is being harmed in scripting, due to missing XSL parameters.

      This occurs in all versions of Filemaker 13 Advanced and Filemaker 14 Advanced.

       

      I am submitting this discussing in two areas (request a feature and report a problem).

       

      Steps to illustrate the problem:

       

      (1) When manually performing an XML export, the user is required to select a static name for the saved file, like so:

      Export functionality for scripting is being harmed due to lack of XSL parameter in "Export Records" script step.

      Screen Shot 2016-03-09 at 11.27.25 AM.png

      (2) When creating an XML export script, the developer is allowed to specify "perform without dialog" and "specify output file"

      Screen Shot 1.png

      (3) After clicking the button marked "specify" next to "specify output file", a path editing window is displayed, like so:

      Screen Shot 2016-03-09 at 11.37.37 AM.png

       

      (4) NOTE: The above steps and screen shots are DESIRED behavior -- this allows a developer to use a $variable for the path.

       

      (5) Going back to the manual process ... at this point, the user would click the button marked "Save"

      Screen Shot 2016-03-09 at 11.27.25 AM.png

      (6) The user is presented with a pop-up dialog box for "XML and XSL Options"

      Screen Shot 2016-03-09 at 11.50.13 AM.png

      (7) The user is allowed to manually choose the grammar, whether or not to use an XSL style sheet, and choose a location for the style sheet. -- This is the root of the problem: NONE of these options are available in the "Export Records" script step, and ALL of them should be.

       

      (8) In the following screen shot, the developer has clicked the "Use XSL style sheet" option using the checkbox, then clicked the "File" option using the radio button (the user can optionally click the specifybutton, but it appears to automatically trigger without input). -- The result is that a new pop-up window appears, prompting the user to choose a folder and file.

       

      Using this option, there is no possibility for the user to enter a $variable name into the results of this window - this dialog box style forces the user to choose an existing (static) file. -- Note that the same is probably true for the HTTP request (no variable usage there either).

      Screen Shot 2016-03-09 at 12.03.45 PM.png

      (9) Because none of these variables are accessible from the "Export Records" script step, there is no way for the "Perform Without Dialog" option to properly function (it simply doesn't have enough information). -- See workaround and desired behavior below.

       

      Workaround:

       

      To (partially) work around this limitation, the developer can perform a manual export from the current layout, and the XML and XSL options that they enter into the dialog boxes during that manual export will be "cached" as part of the Layout, and will be used when the Export Records script step is performed. -- This is only a partial workaround, because none of these values can be viewed or changed by the script.

       

      Desired behavior:

       

      (1) The "Export Records" script step should allow the developer to specify parameters for: (1) XML Grammar, and (2) XSL file location.

      These parameters should be listed on the following screen (within the script editor):

      Screen Shot 1.png

       

      (2) Since file type (XML) is already included in the "specify" screen for the output file, that data is already being captured.

       

      (3) If XML is chosen as the output file type, the user should be required to specify the grammar as a 4th (required) parameter to this function.

       

      (4) The 5th parameter should be a checkbox allowing the user to specify an XSL file, with a "specify" button

       

      (5) When the developer clicks the "specify" button in the previous step, the developer should be able to enter a list of XSL file paths to check (listed in search order). It is critical for this list to allow the use of $variable names in the dialog box, very similar to the current "specify output file" dialog box (which is provided below as an example):

      Screen Shot 2016-03-09 at 12.55.55 PM.png

       

      Thanks,

      Doug Staubach