8 Replies Latest reply on Nov 3, 2016 12:48 AM by carlsson

    Custom Menus per User Account

    AndrewJudd

      HI all,

       

      I'm trying to set up a custom menu for users who don't have full access. In other words are not using the Admin account. I have tried to activate the custom menu using a calculation - see attached - but this doesn't seem to work.

       

      What is the correct way to handle this?

       

      I can't see an option for choosing custom menus in the security area other than the dropdown for custom menus - All, Minimum and Editing only.

       

      thank you

       

       

      Screen Shot 2015-11-25 at 17.20.44.png

        • 1. Re: Custom Menus per User Account
          coherentkris

          I would use the script step Install Menu Set in a script set to run on first window open.

          Prototype

          If  ( Get ( AccountPrivilegeSetName ) <> "[Full Access]" )

          Install Menu Set - Custom, set as default

          End If

          • 2. Re: Custom Menus per User Account
            Extensitech

            In Manage Custom Menus, you can select a default menu set for the file.

             

            In layout mode, Layout->Layout Setup, you can select a default menu set for the layout.

             

            There isn't a default menu set for a privilege set. The option you describe overrides custom menus, to allow access to all menus, just editing menus (cut, copy, etc) or pretty much no menus at all.

             

            However, you can either use the "Install Menu Set" command to install the menu set appropriate for the current user or, as I would do, create one master custom menu and use "install when" to install only those menus and menu items appropriate to the layout, privilege set, extended privileges or whatnot.

             

            As discussed in another thread, we used to have separate menu sets for different layouts and different script functions, but found it's much easier to manage one custom menu set that has all the commands but installs menus and menu items only when appropriate. I'd also recommend putting the "dangerous" ones in the custom menus, like delete all records, replace field contents, and all your "manage" items, but having them only install when the user is full access. This will keep you, the developer, from having to constantly put the custom menu set up and down.

             

            Chris Cain

            Extenstiech

            • 3. Re: Custom Menus per User Account
              dtcgnet

              If you want multiple sets of menus, pay attention to Chris' comments and use coherentkris' method, with a modification.

               

              Assuming you've set up multiple privilege sets, create multiple Custom Menus. You can create as many as you'd like.

               

              Using the startup script method, take full advantage of your opportunities.

               

              If  ( Get ( AccountPrivilegeSetName ) = "Managers" )

              Install Menu Set - Managers, set as default

              Elseif  ( Get ( AccountPrivilegeSetName ) = "Workers" )

              Install Menu Set - Workers, set as default

              Else

              Install Menu Set - Admins

              End If

               

              You don't need to go crazy and have one set of menus for each role in your solution. But having more than one isn't bad at all.

              • 4. Re: Custom Menus per User Account
                Extensitech

                dtcgnet wrote:

                 

                But having more than one isn't bad at all.

                 

                Good point. Don't confuse my preferences with hard and fast "rules".

                 

                I'm sure there are plenty of scenarios where multiple menu sets are easier to manage. For menu sets that are mostly similar, though, consider whether it might be easier to just manage variations in individual menu items rather than whole menu set copies. It's the same sort of decision that comes up when considering whether to add a new layout, table or even file for something that's very similar to something you already have. Sometimes a whole new element makes sense, but often there's an opportunity to manage small differences with a setting, like a hide when, or a type field, or some such.

                 

                We work almost exclusively with custom solutions for small businesses, where changes are frequent (small businesses have a tendency to always be growing and changing). Our focus is on making our development easily "extensible" (hence our name), so we're always asking ourselves questions like, "If the client asks us to change when the 'print' menu item shows, are we going to have to change this in one custom menu, or seven of them?" Because we keep this consideration top-of-mind during development, we've eliminated the need for a full time "clicker", whose job it was to "go make this change on every layout in these 17 files" and so forth.

                 

                But there I go with my preferences again. In the end, think through the tools and do what's right for the given situation. All generalizations are wrong, including this one.

                 

                Chris Cain

                Extensitech

                • 5. Re: Custom Menus per User Account
                  dtcgnet

                  I agree with everything you've said (at the risk of overgeneralizing).

                  • 6. Re: Custom Menus per User Account
                    carlsson

                    I don't get your solution to work. Whenever I switch layout it goes back to the "default menu for this file". How can I make it stick?

                     

                    I have one custom set which is the default for the file.

                    During the Open-script I do this:

                    If[Get ( AccountPrivilegeSetName ) = "[Full Access]"]

                    Install Menu Set ("[Standard Filemaker Menus]")

                     

                    The standard set is choosen, but as soon as I switch layout it goes back to the Default set.

                     

                    Any ideas?  

                    • 7. Re: Custom Menus per User Account
                      dtcgnet

                      There is an option in the Install Menu Set option to set the menu set as the file default.

                       

                      If ( Get ( AccountPrivilegeSetName ) = "[Full Access]"] )

                      Install Menu Set ( "[Standard FileMaker Menus]" ; install as file default )

                      Else

                      Install Menu Set ( "Menu Set for Everyone Else" ; install as file default )

                      End If

                      1 of 1 people found this helpful
                      • 8. Re: Custom Menus per User Account
                        carlsson

                        *douh* I never saw the "Install as file default" option...

                         

                        Thanks!