4 Replies Latest reply on Nov 19, 2012 3:09 PM by philmodjunk

    Navigation Script



      Navigation Script


           The filemaker pro file I'm creating will be used with the toolbar hidden. Therefore I will need some navigation buttons and a pop-up field. I have one small issue with my script I was hoping someone could help me with. To navigate to the 4 layouts I'm using a pop-up field (global field). The user selects the layout from the pop-up field and you are taken to that page. I have one issue, when you first enter browse mode the pop-up field displays the last layout the file was on instead of the layout the user is currently on. I need something in my script that would check which layout the user is on and change the pop-up to that layout. Also, even though my script works (other than the issue I just explained) is this the shown script the best way to write the script?


        • 1. Re: Navigation Script

               When you first enter browse mode the pop-up field displays the last layout the file was on instead of the layout the user is currently on.

               Seems like that would only happen if you are using some other means to change layouts than this field and script.

               You could write a script that is performed by OnLayoutEnter that checks the name of the current layout and uses set field to update your field with the appropriate value from your value list.

               What you show is a common approach for such a layout navigation drop down or pop up. It could be simplified to a single line:

               Go to Layout [Projects::Layout Selection ]

               If you use the "layout name by calculation option" and also give your layouts the same exact names as the values in your value list or vice versa.

          • 2. Re: Navigation Script

                 Thanks for the quick reply Phil! I used your simpler script and works perfectly!

            • 3. Re: Navigation Script


                   I realize that I will need a OnLayoutEnter script. I have objects on some of the layouts that when clicked take you to another layout. For instance I have a project page layout and when a project is clicked you are taken to the project detail layout for that record. I've spent some time trying to write the script but having no luck. How would you write it?

              • 4. Re: Navigation Script

                     You may not need the trigger. The object that you click should use perform script and your script should both take the user to the layout and use set field to assign the appropriate value to the field.

                     You only need the OnLayoutEnter Trigger if there are non scripted ways to access the layout and since such a layout can be tripped when you don't want a script to trip that script trigger, you might want to consider incorporating that step into the your navigation scripts instead of using the trigger.