10 Replies Latest reply on Jul 10, 2017 10:37 AM by TSGal

    Dialog Window prevent PSoS

    Johan Hedman

      I have a solution where there is several reports. To have better UX and have created a layout where all those reports are triggered. This layout I open up in a Dialog Window. I know that a Dialog Window is supposed to act like it is a Custom Dialog, but still I can run scripts within my own file and still have this Dialog Window open.

       

      My problem is, when I try to runt a Perform Script on Server (PSoS) it creates a error and my script fails.

      Skärmavbild 2017-07-04 kl. 08.54.29.png

       

      First I get this dialog and then

       

      Skärmavbild 2017-07-04 kl. 08.54.40.png

       

      this error

       

      1. I wish the error would tell me more like the Error Dialog

      2. Why can I run normal Perform Script from a Dialog Window and not Perform Script on Server ?

        • 1. Re: Dialog Window prevent PSoS
          cdunkake

          2.

          If you run a script on server, your local FMP is not involved in the execution (that's the whole purpose of it).

          - Windows are (virtually) opened on server not your desktop

          - All data reading and writing is done without transmission to your copy of FMP

          - etc.

          That's also why Custom Dialogs are useless on server since there can be no user interaction with a script running on server.

           

          To bugfix - switch the Perform Script On Server to Perform Script and let it run with the debugger and data viewer open. That will tell you what's wrong (usually).

          • 2. Re: Dialog Window prevent PSoS
            Johan Hedman

            cdunkake

             

            I also thought that PSoS was another thing that would not affect the local FMP, but since it does, it do not know if I should treat this as a bug and report it or a strange feature.

             

            I have done that during development to make sure that the script perform like I want to. But doing a PSoS is more then 10 times faster to I do want to use it without first having to close my Dialog Window.

            • 3. Re: Dialog Window prevent PSoS
              cdunkake

              Performing scripts on server is great - no question about it.

              But to bugfix it, you have to perform it locally (keeping in mind, that some behaviour is a little different locally and while running the debugger).

               

              What bug would you report?

              I think you have not figured out what's going, right?

               

              If it is, that you use Custom Dialog in a script that runs on server, it is a bug in your script, not a bug of FileMaker.

              • 4. Re: Dialog Window prevent PSoS
                Johan Hedman

                Whenever I want to do a PSoS I always Inactivate the PSoS in my base Script and use a Perform Script towards same script to run it locally. With that I handle all possible errors and make it bug free.

                 

                I think this is a bug, but I want other users opinion to so that I do not make a elephant out of nothing.

                 

                I do not use Custom Dialog, I use Dialog Window, very big difference.

                • 5. Re: Dialog Window prevent PSoS
                  philmodjunk

                  PSOS cannot open a file that is not already open on the client. I think that all you need is to either open the other file, then do the PSOS or perform a script in the other file that then does the PSOS.

                   

                  The second error is the result of the first error. Since the PSOS failed, there's no script result to get.

                  • 6. Re: Dialog Window prevent PSoS
                    Johan Hedman

                    philmodjunk PSoS can open up perfectly if I do not are in a Dialog Window. If I run same script not being in a Dialog Window it runs perfect

                    • 7. Re: Dialog Window prevent PSoS
                      Markus Schneider

                      post it on the issues section - there are some issues with 16/16Go that are hard to reproduce, but IMHO it's worth investigating those (for both sides, us and them)

                      • 8. Re: Dialog Window prevent PSoS
                        TSGal

                        Johan Hedman:

                         

                        Thank you for your posts.

                         

                        In the Help section "About Window Styles", the section on "Dialog window" has a bullet point that says:

                        "Any operations that attempt to open a document or floating document window will fail when a dialog window is open (for example, using a script trigger to run a script from another file)."

                         

                        Although the script is run on the same file, it is being interpreted as a different file.  That is, if you look in the Help section "About running scripts on FileMaker Server", the "Notes" sections says:

                        "Running server-side scripts opens and closes the files that contain the scripts. Therefore, the OnFirstWindowOpen script trigger is activated when the script starts and the OnLastWindowClose script trigger is activated when the script ends."

                         

                        TSGal

                        FileMaker, Inc.

                        1 of 1 people found this helpful
                        • 9. Re: Dialog Window prevent PSoS
                          Johan Hedman

                          Thank you for the information. It still do not make sense to me. Why would a script running on FMS affect FMP, that is the reason why I am running my PSoS, to no affect my current window.

                          • 10. Re: Dialog Window prevent PSoS
                            TSGal

                            Johan Hedman:

                             

                            Our Development and Testing departments would like to see a copy of your solution as they are unable to reproduce the issue with a Document window.  That is, they are able to run a Perform Script on Server from a Dialog window.

                             

                            I have sent you a private message with instructions where to send the file.

                             

                            TSGal

                            FileMaker, Inc.