Jump to content

Install menu set when...


This topic is 3581 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

post-62898-0-40719600-1403971723_thumb.p

Link to comment
Share on other sites

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

Link to comment
Share on other sites

'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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

 

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.

Link to comment
Share on other sites

This topic is 3581 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.