2 Replies Latest reply on Jun 24, 2011 5:37 AM by Mitch

    Changing Custom Menu Labels based and Values

    Mitch

      Title

      Changing Custom Menu Labels based and Values

      Post

      Hi,

      Regarding Custom Menu's.  When you add a Custom Menu and "Override Default Behaviours" and "Item Name", there is the ability to add a script.  Can this script be used to determine the title displayed for the Custom Menu.  I can not seem to get it to change the title displayed for a Custom Menu, from "On" or "Off" based on the Value of a Field.  I was using:

      If [Field A = "On" ; "Off" ; "On"]

      I have aslo tried the Case Function.

      Perhaps is it not meant for changing the titles of Custom Menu...or am I missing something?

        • 1. Re: Changing Custom Menu Labels based and Values
          philmodjunk

          It seems the issue is to get the menu to update when the value returned by the calculation changes. I found that if I used a global variable for a menu option name, I couldn't change the value of the variable and see the change appear in the menu unless I cycled from browse to layout mode and back to browse again.

          After some experimentation, I found I could use the script step: Install Menu Set to re-install the specified menu to force the menu to update and show the change in value.

          Thus, you can probably get this to work with a script that uses this step to referesh the items listed in your menu after a value is changed.

          • 2. Re: Changing Custom Menu Labels based and Values
            Mitch

            Works well with loading a new menu.   

            Thanks