14 Replies Latest reply on May 9, 2017 9:08 AM by TSGal

    WindowNames ( Get(FileName) )  on macOS Sierra


      I have been testing the beta of macOS Sierra and found the following issue:  When using the function     WindowNames ( Get(FileName) )     it does not list all window names. It only lists the first window that was opened.


      Product and version:  FileMaker Pro 14v6 and 15v1

      OS and version:  macOS Sierra Beta

        • 1. Re: WindowNames ( Get(FileName) )  on macOS Sierra



          Thank you for your post.


          I have forwarded your post to our Development and Testing departments for review.



          FileMaker, Inc.

          • 2. Re: WindowNames ( Get(FileName) )  on macOS Sierra



            Our Development and Testing departments cannot replicate the issue using Mac OS X Sierra Beta 6.  Can you verify the version of Sierra you are using?



            FileMaker, Inc.

            • 3. Re: WindowNames ( Get(FileName) )  on macOS Sierra
              Benjamin Fehr

              I can't replicate either.

              macOS Sierra - Version 10.12 Beta (16A294a)


              FMPA 14.0.6


              For function'WindowNames':

              - File name must be in Quotes "

              - example:

                        WindowNames ( "TEST.fmp12" )

                   shows all opened(!) Windows for file "TEST.fmp12"

              - WindowNames {( fileName )}: delete {} - Brackets since you have only 1 file you want to evaluate





              • 4. Re: WindowNames ( Get(FileName) )  on macOS Sierra

                HI TSGal,


                We are having this problem too, but we are using FileMaker 15.0.1 on El Capitan 10.11.6.


                The problem is that when you type the following function into the Data Viewer, the Data Viewer doesn't update or refresh with updated window values:


                WindowNames  ( Get ( FileName ) )


                Even if you click on "Refresh Values" within the Data Viewer, the results do not update.


                One way to replicate this problem is this:


                1. Type this into your Data Viewer: WindowNames  ( Get ( FileName ) )


                2. Use "File > Open Remote..." to open up 2 different files. Each file should live on a DIFFERENT FileMaker Server. However, each file should have the EXACT SAME NAME. So, if you're opening up a file called "Contacts" on your first FileMaker Server, then please open up a file called "Contacts" on your second FileMaker Server.


                3. Within each file that you open up, the very first window should have its title changed (via an OnFirstWindowOpen script) to "Main Menu". So, instead of the very first window being titled "Contacts" in each file, the very first window that opens up should be titled "Main Menu" (via an OnFirstWindowOpen script).


                4. So far, if everything has been done correctly above, you should now have exactly 2 windows opened called "Main Menu". One "Main Menu" window is from the first "Contacts" file, and the other "Main Menu" window is from the second "Contacts" file. Bring your second "Main Menu" window to the foreground (the one from the second "Contacts" file), while you can still see the first Main Menu window in the background.


                5. At this point, if you refresh your Data Viewer, you will notice that it only lists one "Main Menu" at this point. So far, we're not sure if this is a bug or not?? Should it list 1 Main Menu or 2 Main Menus at this point? Ideally, we would **LOVE** for this to be designed to work just like this -- we really only wanted to list the windows for our FOREGROUND "Contacts" file, not our BACKGROUND "Contacts" file... even though both files have the exact same name. We would actually love for this function to only list 1 Main Menu at this point, since FileMaker doesn't give us the ability to specify the entire FilePath when using the WindowNames function. So how does WindowNames (Get(FileName)) work when there are 2 open files of the exact same name? At this point, we're not sure if we've already stumbled onto a bug or not. Should this function list 1 Main Menu or 2 Main Menus?? We're not sure if listing 1 Main Menu is by design, or if this is part of the bug. We would love for this to be by design (because this is what we want! We only want it to list 1 Main Menu at this point!), but we're afraid that this might simply part of the bigger bug which you will see in a moment below.


                6.  Okay, so we're not sure if #5 is a bug or not. We are okay with the results from #5 above... but we're just unsure about whether those results were intended. Perhaps you can explain #5 further to us? In any case, #5 doesn't matter right now because here we are at step #6. At this point, you are staring at your second Main Menu window (from the second "Contacts" file). Now click on a button on this Main Menu screen that simply opens up a new window called "Invoices" and takes you a different layout.


                7. Okay, so if everything has been accomplished successfully so far, you should have 3 open windows. These are your 3 open windows, in order from front to back:

                a) Invoices -- this is a window from your second Contacts file.

                b) Main Menu -- this is a window from your second Contacts file.

                c) Main Menu -- this is a window from your first Contacts file.


                8. HERE'S THE BUG: Refresh your "Data Viewer" window. It still only lists "Main Menu" -- just one open window! This is false, because you actually have 3 open windows. You can select any of your 3 open windows, and continue to refresh your "Data Viewer" window, yet the Data Viewer window is continually stuck on just one open window "Main Menu".


                9. The bug in #8 continues to happen, no matter how many windows you have open, and no matter how many more open windows you spawn. The results in your Data Viewer window are stuck.


                10. So what were we expecting? Instead of simply getting the result of "Main Menu", we were expecting one of the 2 following results:



                Main Menu





                Main Menu

                Main Menu


                We're actually not sure which one we should have expected (because we're not sure if WindowNames evaluates the current file or all files with the exact same name -- could you please elaborate on this?)


                However, in any case, we know for sure that we shouldn't be receiving this:


                Main Menu


                So when you review all of the steps that I outlined above, either #8 is the only bug in FileMaker Pro. Or, both #5 and #8 are both bugs in the product. Not sure whether we've got 2 bugs happening above or just 1 bug happening above.


                p.s. For Step #5 above, all of this confusion would be instantly cleared up if the WindowNames function was updated to support Get(FilePath) instead of Get(FileName), as I suggested here: Improvements to "WindowNames" function




                • 5. Re: WindowNames ( Get(FileName) )  on macOS Sierra

                  Please see my post above for how to duplicate this problem.

                  • 6. Re: WindowNames ( Get(FileName) )  on macOS Sierra

                    I can reproduce this on OS  X 10.10.5, with both FileMaker Pro Advanced 15.0.1 and FileMaker Pro Advanced 14.0.6 (my guess would be that this bug has been there "for ever").


                    The "funniest" thing is that you get an EMPTY string for WindowNames ( Get ( FileName ) ) in the second file opened.

                    This bug is the same across a number of functions that use the file name as a parameter - LayoutNames.


                    It would certainly be nice (necessary) to have a way of using Get ( FilePath ) or perhaps some new function to actually uniquely identify the file you want to get the information for.


                    To get the window names in just the current file, you can use WindowNames ( "" ), so you could probably do something stupid like have a wrapper script runs subscript in each file open and collects all the window names that way.

                    • 7. Re: WindowNames ( Get(FileName) )  on macOS Sierra

                      Very interesting! You just discovered an undocumented yet very useful feature of the WindowNames function! Thank you!


                      1. Using WindowNames ("") actually DOES accurately return a list of all the windows in the current file.


                      2. And apparently, using WindowNames (Get(FileName)) is broken, because it only returns the list of windows in the FIRST FILE OPENED of that name! That answers all of my questions above.


                      TSGal and TSPigeon, can the FileMaker documentation please be updated to included both of the items listed above?


                      Thank you,


                      • 8. Re: WindowNames ( Get(FileName) )  on macOS Sierra

                        So, to summarize the discoveries here:


                        WindowNames ("") does give you all the open windows for the current file.


                        WindowNames ( Get(FileName) ) only gives you the open windows for the FIRST OPENED FILE with that filename. Special thanks to jormond for sharing this discovery in this thread.


                        I believe that this is a documentation issue, and that the FileMaker 15 documentation should be updated to make note of the 2 discoveries outlined above. TSGal

                        • 9. Re: WindowNames ( Get(FileName) )  on macOS Sierra



                          Thank you for your posts.


                          I can confirm "WindowNames (Get(FileName))" returns the open windows for the first opened file with that filename.  I can also confirm WindowNames ("") returns the open windows for the current file.  Both issues have been sent to Development and Testing for review.  When I receive any feedback, I will let you know.



                          FileMaker, Inc.

                          • 11. Re: WindowNames ( Get(FileName) )  on macOS Sierra

                            TSGal, I just realized that this exact same problem crops up with the "LayoutNames" function as well. And I'm sure this problem crops up with several other functions throughout the system as well.


                            Can you please ask the FileMaker documentation employee to update all of the online help documentation ASAP with this new information? He should ideally find every function where this problem exists, and update all of those functions with this updated information.


                            Not only is this potentially a bug, but it is likely a problem which very few people know about, so it could screw up their solutions. We need to start spreading the word out there to the masses about this problem.


                            Thank you!

                            • 12. Re: WindowNames ( Get(FileName) )  on macOS Sierra

                              TSGal Okay, I figured it out -- this affects every single "Design" function in the entire program! Same problem with LayoutNames, FieldNames, TableNames, etc...

                              • 13. Re: WindowNames ( Get(FileName) )  on macOS Sierra



                                Thank you for the additional information.  All information has been sent to Product Documentation for review.



                                FileMaker, Inc.

                                • 14. Re: WindowNames ( Get(FileName) )  on macOS Sierra



                                  With the release of FileMaker 16, the Help documentation for "Design Functions" has been updated.


                                  FileMaker Pro 16 Help


                                  Specifically, a Note for the filename parameter has been added:

                                  "If you specify no filename (""), functions return results for the current file."



                                  FileMaker, Inc.