6 Replies Latest reply on Jun 30, 2017 6:57 AM by gofmp15

    Hiding Menu and Toolbars for different privilege sets


      I'm having an issue with hiding the menu bar of my solution.


      I want them hidden for all users, but if the user is logged in with any privileges other than 'Full access' login, I want them hidden AND locked too.


      I've looked at various questions regarding the same asked previously, but can't find an answer.


      I wrote a quick script to run OnFirstWindowOpen as below


      toolbar hide script.png

      When opening the solution, the script works for hiding the toolbars, and locking them as necessary, but the menu bar remains in place.


      Any ideas please?


      Many thanks

        • 1. Re: Hiding Menu and Toolbars for different privilege sets

          If you are talking about the main menu bar with File, Edit...etc, You cannot hide it (possible with kiosk mode), but you can create custom menus that have limited function. Kiosk and custom menus require FMP Advanced.

          • 2. Re: Hiding Menu and Toolbars for different privilege sets

            Thanks Tom

            I didn't realise that you couldn't hide that menu... Seems a bit daft as it allows access to everything you'd want to keep most users away from...

            I've not investigated custom menus (obviously). Is there a way of limiting functions to almost nothing in them that way?

            • 4. Re: Hiding Menu and Toolbars for different privilege sets

              Hide Menubar Lock in Windows 10 hides the menu bar but does not deactivate the menu items. I can still use Command 1-9 to perform scripts and other menu items with hot keys.


              Hide Tool bar temporarily hides the arrows, etc. but the user can recall them with Shift+Alt+S. I suppose one could trap for these keys but haven't tried it.


              You can install a custom menu using advance that only has a limited number of menu items, Open, Close, etc. and this will protect your app from command keys. You need Advance for this.


              Suppose you name this menu bar "Minimal".


              Then you can A: apply this to selected layouts using the menu item on the layout form or B: use the script step to Install Menu Item "Minimal" in various scripts etc.


              You could design a menu bar for each privilege set, for instance.


              (FileMaker Inc should provide a free copy of Advanced for each developer over 70 with 30 years of experience.)

              • 5. Re: Hiding Menu and Toolbars for different privilege sets

                Thanks Guys


                Making a custom menu was the answer... just included 'close' and 'exit'.


                I tweaked my startup script to allow for 'full access privilege' users to have toolbars hidden, formatting bar off, and to use the standard filemaker menus, and for the 'data only' and 'read only' users to have the toolbars off and locked and to use my custom menu set.


                An issue I can't get around is that, say I log in with full access, I get the home screen I've made, with all the standard menus as expected. Wen I click a button to navigate to one of the associated layouts, the toolbars change to the custom one, and I can't see why they should.


                There is no other place I have a script that determines what menu set should be used, other than at startup, and even if I did, I'm still logged in with full access.


                Any ideas anyone please?

                • 6. Re: Hiding Menu and Toolbars for different privilege sets

                  It is a bad idea to hide the menu bar and better to create a custom menu with limited menu items: open, close, quite, edit, etc. A layout can be assigned this menu in the layout editor.


                  Why is hiding the menu bar potentially a bad idea?


                  Occasionally an unexpected event occurs and your client cannot quit the file or the application without the menu bar, particularly FIleMaker Go. Suppose you open a dialog that is modal and the client cannot access close or quit because you have hidden the menu and there is no button on your layout for either. FileMaker is essentially hung just as nicely as any infinite loop I have ever written with Allow Abort Off.


                  FileMaker Go has no way out of this problem which can be as simple as a modal window that is doing nothing. This is particularly annoying since the modal dialog in FileMaker GO prevents ANY other app from being selected and requires the reboot of the iPhone. I am using the Otterbox which has a plastic screen protector which might interfere with any finger combination that would trigger the escape or stop a script.


                  I have encountered both finished and sample files from other developer's that hide the menubar in GO and forced me to reboot FileMaker GO. Not to be outdone, I have done this myself.