11 Replies Latest reply on Nov 1, 2011 10:17 AM by philmodjunk

    Stopping input into a pending window

    dzittin

      Title

      Stopping input into a pending window

      Post

      For some data entry, my scripts "jump" to another, "pop up" window where the data is entered. The "pending" window is waiting for the data to be entered and the user to push a button to end the entry process, closing the window and returning to the initial window.

      Here's short story to the problem: the pending window is still open and available for data entry and has its own buttons to return to different layouts. How do I "freeze" or prevent any input into the pending window until a return button is pressed on the "pop up window"? If I allow input into the pending window before the pop up is closed, there is potential for some serious problems to occur.

      TIA,

      -D

        • 1. Re: Stopping input into a pending window
          philmodjunk

          IF both windows are referring to the same record, FileMaker should lock out input on all but one window. An error message should appear automatically if a user or script attempts to modify the record's data on any window where the record is not open for editing if a different window has already opened it. (you can open a record for editing by putting the cursor into the field (go to field in a script) or by using Open Record/Request in a script.

          • 2. Re: Stopping input into a pending window
            dzittin

            Hi PhilModJunk,

            Thanks for the answer. I guess I was not clear in the original posting. I am using a stack to thread through different layouts. The pop up window can only pop back to the pending window.

            However, the buttons on the pending window can be pushed by the user while the pop up window is still active causing a stack inconsistency.

            I suppose I can use a global to disable the buttons, this would likely work but cause a lot of programming. If there was something like a "Gray out and Lock" window function it would do the trick. Anything like this?

             

            -D

            • 3. Re: Stopping input into a pending window
              RonCates

               Set user abort off before openning the pop up window, then pause the script to await input. Use a button with a resume script step to continue the script and close the window after editting. With user abort off and while paused the window will remain formost and the pending window will not accept input. Users will also not be able to close the window without clicking the continue button.

              • 4. Re: Stopping input into a pending window
                philmodjunk

                Or you can use this loop at the end of the script that opens the window:

                Allow User Abourt [off]
                Loop
                   pause /resume [indefinitely]
                End Loop

                Then your button, or the script it performs would close this window and use Halt Script to terminate this infinite loop. Either way, your popped up window simulates Modal behavior to keep the user from interacting with other Filemaker windows until they do something to close the window.

                You can find examples of this approach in the Known Bugs List database that you can download and examine.

                • 5. Re: Stopping input into a pending window
                  dzittin

                  I must be missing something. I set user abort off before opening the pop up. If I do the pause script before opening the window, the pending window is paused, but the buttons are still active, not frozen as I need them to be.

                  What am I missing? How do I dis-able the "back" button on the pending window using your technique?

                  Pending window has:                                      The pop has:

                  |Back Button|                                              ...various data entry activities...

                  |Edit Button|    (causes pop up)                     |Back Button|  (to return to the pending window)

                   

                  The edit button causes the pop up to appear. The back button on the pending window goes back to whomever pushed the pending window onto the stack. I cannot allow the user push the back button on the pending window before the back button on the pop up has been pushed or all h*** breaks loose with stack accounting.

                  Thanks for your help!

                  -D

                  • 6. Re: Stopping input into a pending window
                    dzittin

                    It gets worse. The Windows 'x' button can be pressed by the user which also causes stack corruption. I can see no way in FM to intercept the window control push. If I am missing something let me know.

                    • 7. Re: Stopping input into a pending window
                      philmodjunk

                      Please take a look at the Known Bugs List database file to which I gave you a down load link previously. It does not exhibit the behavior that you describe here. Compare it to what you have set up and see what is different. The Close button is specifically enabled with a custom menu as I want the user to be able to close this "Psuedo dialog" as a way to cancel the operation begun by popping up this window. If you leave out the custom menu, this close button is disabled, though it will look like it will work as it is not given a disabled appearance.

                      • 8. Re: Stopping input into a pending window
                        dzittin

                        PhilMJ,

                        Thank you, thank you. Your hint about custom menus did the trick. I downloaded the bug report, but could not search in it because the searc fields are protected. If I am supposed to unprotect them after the download, tell me to RTFM and I will.

                        Meantime the 'x' box on the window frame is disabled.

                        • 9. Re: Stopping input into a pending window
                          philmodjunk

                          The search fields are not "protected" in any way. This file should be wide open. What message are you getting that would tell you they are "protected"?

                          • 10. Re: Stopping input into a pending window
                            dzittin

                            Whoops, it was not fields. I can look through the bugs, but when I press the search button I get:

                            This action cannot be performed because this file in not modifiable.

                            I click ok and then a search panel comes up with several blank fields except for the first "Keyword" field is "java".

                            When I enter a serch value, I get another error panel: no records matching this criteria were found (I entered "close"). I get a list. I click on an item and get another error message....

                             

                             

                            • 11. Re: Stopping input into a pending window
                              philmodjunk

                              "This file is not modifiable" is telling you that your operating system is treating your copy of the file as "read only". Perhaps it is downloaded to a directory where you do not have write permission? Try moving the file to you desktop and see if it works from there.