IdealData Posted June 28, 2014 Posted June 28, 2014 In my solution I am applying custom menus based on a calculation, using the 'specify' option for 'Install menu when' The basis of the calc is Install menu set when [isEmpty (GlobalField)] My GlobalField is definitely a global FIELD (not $$var) and I use this to track whether a script is running or not. If a script is running then I want the custom menu to be removed, so I set the GlobalField during the script execution. Unfortunately the menu does not disappear as intended, however the calculation is correct. I tried manually entering data into GlobalField and still the menu does not remove. If I change window mode then the menu responds and is removed. Whilst I also know I can use the script step 'Install menu set' this is not desirable as I have hundreds of scripts using the same technique. Any one know why the 'Install menu set when' feature does not respond in a dynamic way - I didn't see any limitation in the FM docs. Many thanks
hbrendel Posted June 28, 2014 Posted June 28, 2014 Instead of setting a global during script execution you could use the script step Install Menu Set [standard FileMaker Menus]. You'd have to change this in hundred of scripts. Why did you create a hundred scripts with a function that's not working yet? I'm not aware of a calculation function "Install Menu Set when ... ". Please elaborate. I'm also curious why you would get rid of a menu set during script execution. And what happens after the script has finished execution?
bruceR Posted June 28, 2014 Posted June 28, 2014 There is no "Install Menu Set when" calculation. Â But there is an "Install Menu when" calc that is part of the definition of a custom menu.
IdealData Posted June 29, 2014 Author Posted June 29, 2014 BruceR: Thanks for the correction, this is the option I am discussing hbrendel: I didn't create hundreds of scripts with a function that doesn't work (yet) as my original system design pre-dates Custom Menus - in fact my method of script arbitration has been running for 15 years! The menu I want to install/remove provides direct access to some 15+ other files that comprise the solution and it's necessary NOT to be able to use some menus whilst a script is running in the current file. I understand what my options are in terms of modifying the scripts, however, my question is: Any one know why the 'Install menu when' feature does not respond in a dynamic way? Thanks
hbrendel Posted June 29, 2014 Posted June 29, 2014 'Install menu when' operates - as it says - the moment a menu is installed. So it does not when some data (field / variable) changes. Most of the times menu options are not available during script execution. Are they in your case? Did you test this? Could you describe it? I didn't create hundreds of scripts with a function that doesn't work (yet) as my original system design pre-dates Custom Menus - in fact my method of script arbitration has been running for 15 years! But did you add a script step 'Set Variable [$$xxxxx]' to each script? You could as well have taken 'Install Menu Set' in place.
IdealData Posted June 29, 2014 Author Posted June 29, 2014 My design is also before global variables. The question still remains as I said. There is no docs that say it should not work.
bruceR Posted June 29, 2014 Posted June 29, 2014 HBrendel: have you even tried that? Have you looked at the documentation? That's a circular; and incorrect; statement. https://fmhelp.filemaker.com/fmphelp_13/en/html/fmpa_custom.23.8.html#1028579 IdealData: I think you're looking in the wrong place. How does FileMaker know when a field value has changed? I suspect you will have to do something that refreshes the window, either a direct refresh, change of record, etc.
hbrendel Posted June 29, 2014 Posted June 29, 2014 @IdealData: I think the answer is in my previous post. @BruceR: I'm not sure what statement you're refering to.
Wim Decorte Posted June 29, 2014 Posted June 29, 2014 IdealData: I think you're looking in the wrong place. How does FileMaker know when a field value has changed? I suspect you will have to do something that refreshes the window, either a direct refresh, change of record, etc. Agreed. The menus live at the file/application level, not at the data level so I would not assume that there is any data notification going on.
bruceR Posted June 29, 2014 Posted June 29, 2014 Hbrendel: "a menu is installed when a menu is installed." What? Maybe you mean when a menu SET is installed.
hbrendel Posted June 29, 2014 Posted June 29, 2014 Well... yes. It doesn't change the essential of my answer however. I'm getting tired of this discussion. Wish you success.
Rick Whitelaw Posted June 29, 2014 Posted June 29, 2014 What about the obvious. Script commits the record, the If(Test) Install menus set?
Recommended Posts
This topic is 3865 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now