2 Replies Latest reply on Jul 26, 2013 9:07 AM by kaostika

    Custom Menus Questions

    kaostika

      Hi, I want to have a menu set that have a Subfoder Menu that shows a list of all the active records for that user. Is there a way to do that?

       

      Oreste

        • 1. Re: Custom Menus Questions
          mikebeargie

          You "can" do this, but only with a specified number of records. I'm not sure what you mean specifically by "active" records, which is why the "can" is in quotes.

           

          Here's an example of how to do it for three records:

          1) Make a new submenu, ie "active records"

          2) Make a new Menu Item. Specify "Command", check box for "item name", and set the calculation as GetValue($$names;1)

          3) Check the box for "Action", specify to run new script "menu actions" with a parameter of 1.

          4) Repeat steps 2 and 3 for additional menu items, changing the calculation in #2 and parameter in #3 to the record number you are making the menu item for (2,3,4,etc..)

           

          5) You will need to create some sort of layout/record based trigger script that sets the global variable $$names. This will be used to show the submenu items, so make the names short. You should also at this time set another global variable, IE $$records, so you can store the serials of the corresponding "active" records that make up $$names.

           

          6) in your "menu actions" script, you will write out what action to take when someone selects a menu item. IE if they are choosing the second menu item, a parameter of 2 is passed. So maybe your script will look something like this:

           

          enter find mode

          go to layout (whatever layout these records are from)

          set field - serialNumber = GetValue($$records;get(scriptParameter)

          perform find

           

          Usually "active" in filemaker means whatever record is loaded on the screen (and has been activated by clicking in a field in browse mode, activating the record lock for that user). This really only allows for one record to be "active" at a time in a given window, which is why I'm kind of confused for your needs here.

          • 2. Re: Custom Menus Questions
            kaostika

            I did something simlar using a relatied TO and the list function and getvalue.  I thought I read there was a variable method of doing this. So I am doing the last 20 records that should be fine.  Thanks!

             

            For me active meant a subset of the users records that was marked active, rather than incative (closed)