designdb

Configure Region Monitor Script script step - Error in DDR XML

Discussion created by designdb on May 10, 2017
Latest reply on Jun 2, 2017 by TSGal

Product and version

     FileMaker Pro Advanced 16.0.1.162

OS and version

     macOS 10.12.4

Hardware

     4GHZ 5K iMac

Description

     If a Configure Region Monitor Script script step (set to, say, "Geofence") is pointed to a script, that script reference is retained even if the monitor type is set to "Clear".  This is only visible in the DDR.  Additionally, the text of the script step expresses this script setting.  So, while the Script Workspace says:

     Configure Region Monitor Script [ Monitor: Clear; Name: $name ]

The DDR will say:

     Configure Region Monitor Script [ Monitor: Clear; Script: “My Script Name”; Parameter: $param; Name: $name ]

 

It is relatively common for the DDR to continue to export unexpressed code, but in this case the unexpressed code is being displayed in the DDR as if it was being expressed.

 

Sample DDR XML:

<Step enable="True" id="185" name="Configure Region Monitor Script">
     <StepText>
          Configure Region Monitor Script [ Monitor: Clear; Script: “Test JSON Functions”; Parameter: $param; Name: $name ]
     </StepText>
     <Calculation><![CDATA[$param]]></Calculation>
     <DisplayCalculation>
          <Chunk type="NoRef">$param</Chunk>
     </DisplayCalculation>
     <Text />
     <Script id="1" name="My Script Name" />
     <MonitorType value="Clear">
          <RangeName>
               <Calculation><![CDATA[$name]]></Calculation>
               <DisplayCalculation>
                    <Chunk type="NoRef">$name</Chunk>
               </DisplayCalculation>
     </RangeName>
     </MonitorType>
</Step>

 

While I’m at it, is there any guidance available on what the <Text / > node is for?  There doesn’t seem to be a way to populate it, and it doesn’t appear in the DDR XML documentation.

 

How to replicate

1) Make new script

2) Add a Configure Region Monitor Script script step.

3) Set it to monitor “Geofence”

4) Set it to run a script.

5) Save the script

6) Change the script step to monitor “Clear”

7) Save the script

8) export the XML DDR

9) Examine the XML for that particular script step in the resulting file.  It should probably not have a <Script> node.  It should definitely not include the script name in the <StepText> node.

 

Workaround (if any)

Delete the step, and make a new Configure Region Monitor Script step.  Set it to monitor “Clear” before selecting a script.  You will no longer be able to select a script, which is right and good.

Outcomes