1 2 Previous Next 15 Replies Latest reply on Oct 14, 2016 7:19 AM by gdaquino

    Overwrite [Go to Layout] via menu

    gdaquino

      Hello experts,

       

      Is there a way to overwrite the [Go to layout] for a specified Menu Set so that only for those user the 'Go to layout' will be managed by a script?

       

      I can create a menu set with all the main menu items, but not directly with command.

      For example if I want to put a copy of the file menu inside the menu set is ok, but I can only add the item for the [Go to Layout] without the possibility to edit it.

       

      Why?

       

      Thanks!

       

        • 1. Re: Overwrite [Go to Layout] via menu
          Johan Hedman

          You can set Menu Set standard for the file through a script.

           

          You can then on each layout in Layout Settings setup what Menu Set you want to use.

           

          If you want to change Menu Set depending on users Privilege Set, then use the Script Trigger OnLayoutLoad and have a script do a

           

          If ( PrivilegeSet = "SuperUser" )

               Set Menu Set to MENUSET_UPERUSER

          Else If ( PrivilegeSet = "Guest" )

               Set Menu Set to MENUSET_GUEST

          End If

          • 2. Re: Overwrite [Go to Layout] via menu
            gdaquino

            Yes thanks johanhedman,

             

            Is there a way to overwrite the GO TO LAYOUT command?

             

            I mean, I know how to set a menu for each layout but I want specifically to overwrite the command [Go to Layout] so that in any case of navigation I could check which user is navigating.

             

            I know that I can put a script on inner menu, but I'm just looking if there is an advanced technique because I know that all the menu items even command, set from the menu, overwrite the internal menu. For instance if you replace the 'Print' items inside the File menu in a new version of that menu, when the user print everything, the behaviour would be your behaviour instead of standard one.

             

            So if I do the same for the [Go to Layout] command I can insert a control when the user move inside between layout, without using each trigger on each layout.

             

            I'm not sure if my question is well presented!

             

            Thanks!

            • 3. Re: Overwrite [Go to Layout] via menu
              Johan Hedman

              You can always in your OnLayoutLoad trigger check to see if user have access to that layout or not and if so, take user to another layout.

              • 4. Re: Overwrite [Go to Layout] via menu
                gdaquino

                Sorry,

                 

                I think that I didn't explained clearly my question. I know that I can use triggers and menu buttons, but I'm looking if I can overwrite the [Go to Layout] command so that I can insert a logic there, not on layouts and not on buttons.

                 

                Thanks!

                • 5. Re: Overwrite [Go to Layout] via menu
                  Johan Hedman

                  If you use Go to Layout, only way to handle that action is to use a Trigger when you arrive at that layout or in your script handle it directly after Go to Layout

                  • 6. Re: Overwrite [Go to Layout] via menu
                    gdaquino

                    So it is not possible to overwrite it via menu?

                     

                    Why?

                     

                    And why you can overwrite some commands and not those?

                    • 7. Re: Overwrite [Go to Layout] via menu
                      Johan Hedman

                      Menu Set can not control your actions. That is on each layout to check if you have record access or not.

                       

                      You can of course make your own Security table where you say if user are aloud to enter certain layout or not and check in that table if your user are allowed to go to certain layout, but that is still up to you to check. There is nothing that Go to layout can check in that specific script step

                      • 8. Re: Overwrite [Go to Layout] via menu
                        Johan Hedman

                        What do you mean with overwrite commands?

                             Some commands in a script are for certain products of FileMaker. For example there is specific script steps for FileMaker Go.

                        In each script you can set the script to run on full authority and this will make a user with less access possibility to do changes through script that the user would not be allowed to do on a layout.

                        • 9. Re: Overwrite [Go to Layout] via menu
                          gdaquino

                          Yes,

                          Menu set can control your action, I discovered on FM documentation (FTS 15).

                           

                          I can set a script on a specific command on a menu set, for instance let's say as I mentioned the PRINT.

                           

                          You can set the print menu item to run your print script instead of classic print, so that you can add there additional control. And (If I understand it correctly) everywhere you call the print your script will be called.

                           

                          If you try to create a menu set and copy the file menu, you can edit almost all menu items, even some command, but not others...

                           

                          This is what I miss. I know that you can control via triggers or menu buttons the control on a layout.

                          • 10. Re: Overwrite [Go to Layout] via menu
                            Johan Hedman

                            Yes each part of native FileMaker Menu can be changed to run a script instead of native behaviour. But you still can not change Go to Layout to check for your access to that layout.

                             

                            If there is a behaviour that you miss we have area Product ideas

                            Product Ideas

                            where you can add your own idea and have people voting it up so that it might appear in the coming version of FileMaker

                            • 11. Re: Overwrite [Go to Layout] via menu
                              hbrendel

                              Don't include the regular Go To Layout menu item in your custom menu. Instead make your own.

                              1 of 1 people found this helpful
                              • 12. Re: Overwrite [Go to Layout] via menu
                                gdaquino

                                What do you mean?

                                • 13. Re: Overwrite [Go to Layout] via menu
                                  Johan Hedman

                                  You take the Status Bar away so that the user can not choose to navigate themselves through the layout chooser

                                   

                                  Skärmavbild 2016-10-14 kl. 15.57.00.png

                                   

                                  Instead hide it

                                   

                                  Skärmavbild 2016-10-14 kl. 15.57.24.png

                                   

                                  Then it is totally up to you to create all kind of navigation inside your solution

                                  1 of 1 people found this helpful
                                  • 14. Re: Overwrite [Go to Layout] via menu
                                    hbrendel

                                    When you're creating a Custom Menu you're not forced to include everything and override functions. You can omit some items. Then you add a new menu item that is not based on an existing command and you assign a script to it. This script can be anything.

                                    1 of 1 people found this helpful
                                    1 2 Previous Next