June 28, 201411 yr 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
June 28, 201411 yr 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?
June 28, 201411 yr 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.
June 29, 201411 yr Author 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
June 29, 201411 yr '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.
June 29, 201411 yr Author My design is also before global variables. The question still remains as I said. There is no docs that say it should not work.
June 29, 201411 yr 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.
June 29, 201411 yr @IdealData: I think the answer is in my previous post. @BruceR: I'm not sure what statement you're refering to.
June 29, 201411 yr 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.
June 29, 201411 yr Hbrendel: "a menu is installed when a menu is installed." What? Maybe you mean when a menu SET is installed.
June 29, 201411 yr Well... yes. It doesn't change the essential of my answer however. I'm getting tired of this discussion. Wish you success.
June 29, 201411 yr What about the obvious. Script commits the record, the If(Test) Install menus set?
Create an account or sign in to comment