5 Replies Latest reply on Jul 1, 2015 1:11 PM by RoelfW

    new window script command not executing

    RoelfW

      Title

      new window script command not executing

      Post

      Hi

      I have a button on a list view

      it runs a script that show record details in a new window

      this works fine on a screen / layout where I have no scripts currently running

      it does not work - that is the new window is not created - on a screen layout where I have a script paused

      instead it opens the layout in the existing window (attached to the paused script) and does not seem to executive the new window command

      I am puzzled as to why this is

       

      Roelf

        • 1. Re: new window script command not executing
          philmodjunk

          What do you mean by:

          "it opens the layout in the existing window"?

          If you can see the layout and have a button for a new window, the current window already has that layout open in it so I am not sure what you are describing here. Do you mean that nothing at all takes place?

           

          • 2. Re: new window script command not executing
            RoelfW

            I have continued to try to understand this behavior by doing some experimenting.

            When I open the  source layout from the Manage Layout screen, and click on the show details button it behaves exactly as I planned.

            It open a new window to show the details - this is the now foreground window - the window / layout with the calling button stays in the background, 

            But when I do the same thing under the control of the paused script - that is attached to the what I planned to be the background window - the new window command in the called script does not execute. It is as if it is not there. When I insert a custom dialogue with a Get ( WindowName ) after the New Window step in the called script, it shows the the current window is in fact the previous window - the one that was active before I executed the New Window command.

            So FM opens the detail layout in the window attached to the paused script (the one which stays in the background) in the above test.

            So the only difference that I can see is that in the second case the fact that the paused script is attached to a window is somehow negating the new window command in the called script which shows the detail information.

            Yet when I browse The forum and the support pages I cannot find anything about this - it says that a new window / select window script step should control which is the foreground or active window to which the current running script is applied.

            Roelf

            • 3. Re: new window script command not executing
              RoelfW

              Hi PhilModJunk

              here is the sequence in the called script

              New Window

              Go to Layout (detail layout for selected record in the list view shown in the previous layout in the previous window).

              Here is what I  get

              The detail layout opens in the previous window, not the window set up by the new window command.

              FM13 Pro Adv running under Windows 7

              Roelf

              • 4. Re: new window script command not executing
                RoelfW

                oops typing error

                 

                the now in the last sentence should be a not

                also to be complete

                FM 13 Pro Adv running under Windows 7

                Roelf

                • 5. Re: new window script command not executing
                  RoelfW

                  I tracked it down

                  The window in which I go to layout - the one which has the button for the showing the details in a new window / layout - had the "advanced options" box ticked in the New Window script step which created it - even though I just treat it as a document window.

                  When I un-ticked this box, the behavior went back to what I had planned. The button calls a script which opens a new window with the record details in it.

                  Thanks

                  Roelf

                  1 of 1 people found this helpful