AnsweredAssumed Answered

Hide object when script running only works one way

Question asked by realgrouchy on May 26, 2015
Latest reply on Apr 12, 2016 by realgrouchy

Summary

Hide object when script running only works one way

Product

FileMaker Pro

Version

13.0.5

Operating system version

10.8.5

Description of the issue

In my FMP13 database, I have a script to select and print members with a specified condition, and I want to give my users the ability to review what records are selected before printing them. To this end, I have the script pause and they can change the condition for any member(s) that they do not want to print, then they can press continue.

However, the layout on which they do this also has the button that is used to trigger the print script. I'd like to hide this button (among other things) while the script is paused.

I can do this by adding "Get ( ScriptName ) > 0" to each of the objects I want to hide, but they all have different hide conditions and I'd have to apply it to every current object and every new object going forward.

Instead I'd like to just put a big rectangle over the whole area that only hides in the opposite scenario, i.e. "Get ( ScriptName ) = " or "not ( Get ( ScriptName ) > 0 )"

Steps to reproduce the problem

1. Create an opaque rectangle with hide condition of either "Get ( ScriptName ) = " or "not ( Get ( ScriptName ) > 0 )"
2. Create a script with a pause
3. Create a button to trigger the script created in step (2), arrange that position to behind the object created in step (1).
4. Save layout
5. Click the button.

Expected result

Expected Result: The object created in step (1) should not appear after saving the layout, but should appear after clicking the button and/or while the script is paused.

Also, if I click "Cancel" to cancel a paused script, any objects hidden with "Get ( ScriptName ) > 0" don't reappear.

Actual result

Actual Result: The object does not appear at all, at any time.

Workaround

Only workaround available is to find every object I want to hide and add "Get ( ScriptName ) > 0" to its existing hide conditions. Aside from being cumbersome (since many of these are buttons layered on top of each other that appear based on various conditions), I fear I will forget to do so if I create new objects, and a user in a paused script will engage in unexpected behaviour.

Outcomes