6 Replies Latest reply on Apr 4, 2016 1:46 PM by Doug Staubach

    Filemaker "Export Records" script step is missing a parameter

    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 specify button, 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

        • 1. Re: Filemaker "Export Records" script step is missing a parameter
          TSGal

          DougStaubach:

           

          Thank you for your detailed post.

           

          I am unable to replicate the issue with FileMaker Pro 13 and FileMaker Pro 14 under Mac OS X 10.11.3, Mac OS X 10.10.5.  I am also unable to replicate the issue with FileMaker Pro 14 under Windows 7.  I am trying to locate a copy of FileMaker Pro 13 to install on my Windows 7 machine.

           

          This is what I have done:

           

          1. After launching FileMaker Pro, I created a database file, TEST.fmp12, with one Text field "Name".  I entered one record with the value "TSGal".

           

          2. I opened either Script Workspace (14) or Manage Scripts (13).

           

          3. I created a new script, "New Script", with the one script step Export Records.  I selected Perform without dialog, specified the output file ($variable), and selected the File Type "XML".

           

          4. When I click OK, I am prompted to Specify XML and XSL Options.  Here, I can specify the Grammar and the style sheet.

           

          Let me know what steps I am missing to replicate the issue.

           

          TSGal

          FileMaker, Inc.

          • 2. Re: Filemaker "Export Records" script step is missing a parameter
            Doug Staubach

            Hi TSGal:

             

            Thanks for the response - sorry if my post wasn't clear.

            The dialog boxes for the output file (correctly) accept a variable, which you noted from testing.

             

            The problem is that the dialog boxes for the xsl template file cannot accept a variable.

            When you are prompted to specify the XSL file location, you are presented with a "file selector" dialog, which behaves differently than the output file dialog. It requires the user to navigate to a file location and does not allow variables.

             

            Does this help clarify?

             

            Thanks,

            Doug

            • 3. Re: Filemaker "Export Records" script step is missing a parameter
              TSGal

              DougStaubach:

               

              Very clear.  However, I am still unable to replicate the issue.  After selecting the first variable for the output file, I am presented with the "Specify XML and XSL Options" window.  I am able to click on File, which then presents me with the "Specify File" window, where I can then enter another variable.

               

              TSGal

              FileMaker, Inc.

               

              Screen Shot 2016-03-10 at 7.47.47 AM.png

              • 4. Re: Filemaker "Export Records" script step is missing a parameter
                Doug Staubach

                Hi TSGal:

                 

                Your screen shots are correctly showing that we can use variables in the OUTPUT file, but that isn't the part that is broken. (I only mentioned the output file because I wanted to show the difference in the way the output filename can be selected and changed, versus the way the XLST style sheet is selected and changed).

                 

                Following is a screen shot from a layout that I created with FileMaker v13:

                Screen Shot 2016-03-18 at 1.21.52 PM.png

                Notice that even though I upgraded my FileMaker client to v14, there is a $Variable listed for the XSLT (style sheet) name. -- This is no longer an option in v14, so I can only show this screen because I have not edited the layout. -- If the export function listed the layout name as a parameter, I could easily change it using the scripting workspace, but the only place that this value is accessible (and stored) is in the metadata of the layout itself.

                 

                So to revise my original description of the problem, this function used to work differently in FileMaker v13, and is now 'broken' in FileMaker v14. -- My suggestion is to allow the script developer to specify the "Grammar Type' and 'Stylesheet Name' as part of the Export script step (make them additional arguments), so script developers can run the export function using different parameters (the way it is now, unless we want to try to train end-users to click the correct options, we are limited to having only one set of predefined export settings per layout). -- The alternative, if you don't want to change the number of parameters used by the Export script step, is to make it work like it did in FileMaker v13.

                 

                Thanks,

                Doug

                • 5. Re: Filemaker "Export Records" script step is missing a parameter
                  TSGal

                  DougStaubach:

                   

                  Perhaps I'm still missing something, but in my screen shot, I have shown a variable ($variable) for the output file, and a variable ($variable2) for the XSL style sheet file.  The screen shot is from a Mac OS X 10.11.3 machine running FileMaker Pro Advanced 14.0.5.  If you want, I can include a screen shot from Windows 7.

                   

                  Please post a screen shot of the "Specify XML and XSL Options" window in FileMaker 14 where an option hasn't been selected.

                   

                  TSGal

                  FileMaker, Inc.

                  • 6. Re: Filemaker "Export Records" script step is missing a parameter
                    Doug Staubach

                    Hi TSGal:

                     

                    You were right, and I was wrong ... FileMaker DOES allow for use of a variable name in the XSLT location.

                     

                    I still believe that this parameter should be visible from the script step (like the save file parameter already is), but that is more of a "feature request", and isn't as important.

                     

                    Thanks,

                    Doug