6 Replies Latest reply on Aug 9, 2016 11:41 AM by ezeitgeist

    drop down navigation menu?

    ezeitgeist

      I did some research, but am still a bit confused.

       

      My goal: Have a field that is a Drop-Down field with a value list. When someone selects a value, it triggers going to a particular layout. I have 4 similar layouts that just order things differently in reports/portals (depending on the layout) and I'd like to create a drop-down navigation rather than having 4 separate navigation buttons.

       

      What are the pieces and steps needed? I'm sure it is something with calculation and OnObjectModify and global fields, just not seeing how to actually pull it off. Any advice would be greatly appreciated.

        • 1. Re: drop down navigation menu?
          keywords

          It seems to me that an OnObjectModify script trigger is probable the activation method you need. The script itself will need to capture the new field contents, and SetVariable at the top of your script is probably the best way to do that. Navigation within the script can then be controlled with a series of If, Else If steps to navigate to the required layout. Should be fairly straightforward.

          • 2. Re: drop down navigation menu?
            ezeitgeist

            I'm somewhat new to scripting. Could you layout an example by chance?

             

            Set Variable [$Select; Value:Global:DropDownSelector]

            If[$Select = "by Date"; Go to Layout [Connections:byDate]; Else if [???]

             

            Sorry, I've never used If statements yet. Thank you ahead of time!

            • 3. Re: drop down navigation menu?
              TSPigeon

              ezeitgeist:

               

              Thank you for your post!

               

              keywords recommendation for OnObjectModify trigger will definitely work for this. It really depends on how you want it to work, as how the script would run. What will be in the Value List?

               

              The simplest way I can think to do this is have the Layout Names in the Value List and run:

              Go To Layout [ FieldNameForDropdownMenu ] (Layout Name by Calculation)

              If you need something more specific, could you include how you'd want it to choose between layouts?

               

              TSPigeon

              FileMaker, Inc.

              • 4. Re: drop down navigation menu?
                ezeitgeist

                When you say "run" Go To Layout, how exactly do you do that?

                 

                So I have created a Global Field that is a drop-down menu. In the Value List for that Drop Down menu I have listed each layout name (essentially).

                 

                The step to then get the value item selected to trigger the Go To Layout part is where I am a little lost.

                 

                I write a script and then trigger that script "OnObjectModify" so that when something is selected from that drop-down, the script is triggered.

                 

                BUT, what exactly is in that script?

                 

                TSPigeon Where does the Go To Layout go? Is it in an "If" "Else, if" script like keywords recommends? Or, is it within the (Layout Name by Calculation) part just mentioned? Or is it a mix of the both? And, if it is in an "If" "Else, If" calculation, how do I write one of those exactly?

                • 5. Re: drop down navigation menu?
                  TSPigeon

                  ezeitgeist:

                   

                  The option I mentioned wouldn't require "If" or "Else If". Go To Layout is a Script Step you would include in the script your write. The script could be triggered by the OnObjectModify Trigger. Untitled.fmp12 has a very basic example.

                   

                  TSPigeon

                  FileMaker, Inc.

                  • 6. Re: drop down navigation menu?
                    ezeitgeist

                    Oh, that was so much easier than I expected! Thank you!