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
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!
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.
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.
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
So it is not possible to overwrite it via menu?
And why you can overwrite some commands and not those?
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
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.
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.
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
where you can add your own idea and have people voting it up so that it might appear in the coming version of FileMaker
1 of 1 people found this helpful
Don't include the regular Go To Layout menu item in your custom menu. Instead make your own.
What do you mean?
1 of 1 people found this helpful
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.