5 Replies Latest reply on Jan 30, 2012 3:39 PM by philmodjunk

    Find the popup!



      Find the popup!


      Hi All,


      I have a button that opens a popup for the user to take notes. I noticed that if pressed the button again it opens another popup creating duplicate windows. Is there a way to have it check if it is already open and if so bring it to the front?





        • 1. Re: Find the popup!

          Why not use the script to take the user to another layout to make their notes, thus avoiding all the issues of managing multiple windows?

          • 2. Re: Find the popup!

            Another option might be to run a "close window" script step before opening the new window.

            You would have to give your new window (the notes window) a name.

            Like this:

            -Close Window (Notes)
            - New Window (Notes)
            - Go to layout ...


            I did this because my problem was that I would close my filemaker with the pop up window still open somewhere behind my main window and the next time I opened my file the window would be the size of the pop up window and not the size of the main window.

            Kind of annoying.

            • 3. Re: Find the popup!

              Reason for the popup is because the layout the notes will be coming from has several tabs of information that they need to go through. So to go through everything make notes in your head then go to another layout to make notes would be a lot of work. This way they can make notes on the fly.

              Guy your Close Window idea worked great.

              Thanks for the responses gents.

              • 4. Re: Find the popup!

                What's the difference in popping back and forward between windows to check the contents of the tabs, and flicking back and forward between layouts?  It's easier to put a 'back' button to toggle between the 'tab' layout and the 'notes' layout than it is to double-check all the problems with window management - note the additional potential problem with them that Guy raised.

                And if you would like the tabs and the notes to be visible on the same screen at the same time, put the notes field below the tabs, on the same layout.  Sometimes it's even handier for the user to have it there as a global field, they jump back and forward across the tabs (even between records), and then when they're happy with their final notes, they hit a 'Log these notes' button and a script simply posts them.  No change of layout or windows at all, and even more info potentially available to them.

                I'm only so reluctant to use pop-up window because I've yet to find a use for them that was worth the effort, by a factor of about 10.  Look through this forum and you'll find lots of queries - usually long ones, full of frustrations - about the problems of managing multiple windows.  Then try and find one where the recommended answer to a query was 'use multiple windows'.  I find that ratio is about the same ratio as 'problems:benefits'.

                Guy has solved this problem for you, so that's great!

                • 5. Re: Find the popup!

                  If show custom dialog were more capable, I'd use new window a lot less...

                  I find that pop up windows can improve the user experience. For one thing, it's often handy for the user to see the data in the underlying window when interacting with the popped up window. Seeting up a single layout with both that "context" data and the data and controls in the pop up is a much more complex and less user friendly set up than just opening a small dialog for a few moments for the user, then closing it when they are done.

                  But like adding spices to food, it can easily be over done and thus must be used sparingly. I try to stick to a two window limit for most of my systems. Window 1 is the main window that fills all or most all of the monitor screen. Window two would be a briefly opened "dialog" that has the same function as show custom dialog, but with more input options than are possible with the three plain edit box type input fields and unformatted dialog text of a show custom dialog. I use code to make the pop up modal, so that it doesn't get lost behind the main window. Like show custom dialog the user must dismiss the window before returning to the main window.