Jump to content
LXR

Drop-Down Menu for Navigational Links

Recommended Posts

LXR

Is anyone aware of a FM plugin that allows you to create drop-down menus for navigational links like those on most web pages?

Share this post


Link to post
Share on other sites
Ender

I don't think you need a plug in for this. You could define a custom value list for your navigational choices, attach that to a global field, then use a script attached to a button that branches to the correct layout based on the contents of the global.

Share this post


Link to post
Share on other sites
LaRetta

Michael, your link does not work for me. I get 'URL not found on this server.' Does it work for you? smiley-smile

Share this post


Link to post
Share on other sites
comment

No, it's from before the forum software changeover. I think it may be this one, but I cannot say for sure.

Share this post


Link to post
Share on other sites
laurenkuhlman

Try my link. I started a central blog to post all my tips and tricks instead of spreading them over several message boards.

Share this post


Link to post
Share on other sites
Ender

Hi Lauren, welcome to the Cafe.

 

I started a central blog to post all my tips and tricks instead of spreading them over several message boards.

 

We don't get out much around here, so it's good to see what's cooking in the rest of the FileMaker world. This new-fangled "blog" stuff is a little too formal for me. I like to just kick ideas around with the kids here on the old cafe. If a great technique or practice comes out of a discussion, then I suppose that would be blog-worthy, but by that time we've already moved on.

 

I think for our general audience here, it's easier to find answers among past discussions than to sift through the growing number of blogs out there. And a downside to blogs is a lack of differing views and solutions, and possibly providing bad information without others to correct it. I stumbled across a blog a few months ago with bad advice in it, but the few that had commented before me had thought it was a nifty technique. Unfortunately, I can't find it now (you know how blogs come and go).

 

So I'd invite you to contribute here in the forums. I think it's more useful in the long run (heck, you managed to dig up THIS post from over two years ago, so it can't be that hard to find things). ;)

Share this post


Link to post
Share on other sites
laurenkuhlman

Ok. Good advice. Here it is then.

 

This takes you through as if you were starting from scratch.

 

I came up with this Filemaker Drop Down Navigation Menus solution when a client’s layout became crowded. I hope it can help you.

 

We will make a dropdown in our Filemaker solution. My Filemaker Solution is called DROPDOWN.

 

Create a new text field called Dropdown. File > Define > Database. Enter the field name. Create > OK.

 

Define a value list. File > Define > Value Lists > New. Enter the value list name Dropdown. Enter the custom values Script A, Script B, Script C and Script D > OK > OK.

 

Create the script. Scripts > Scriptmaker >

 

New > Name the Script, Script A. OK.

 

New > Name the Script, Script B > OK.

 

New > Name the Script, Script C > OK.

 

New > Name the Script, Script D > OK.

 

New > Name the Script, Dropdown >

 

Double-click If > Specify. Enter the calculation If(DROPDOWN::Dropdown=”Script A”;1;0). With the If statement selected, double-click Perform Script. Click Specify > Choose Script A > OK.

 

With the If statement selected, hold down shift and click the End if to select all your script steps. Click Duplicate three times.

 

Change each calculation from Script A to Script B, C or D, respectively. Also, change each Perform Script to the respective calculation Script.

 

Select the bottom End If, Double Click Insert Calculated Result. Check Go to target field. Choose DROPDOWN > OK.

 

Click Calculated Result: Specify…. Type “” > OK.

 

Double-click Go to Next Field.

 

Click OK > OK to exit the Scriptmaker.

 

In layout mode, double-click the DROPDOWN field. Choose Display As… Drop-down List and Display Values from: DROPDOWN > Check Include arrow to show and hide list > OK.

 

Draw a button near the dropdown field. Choose Perform Script > Specify > Dropdown > OK > OK. Click outside the button to go w/o labeling the button.

 

Use the Scriptmaker to specify actions for the Script A - D. Anything you want to do. In the sample file, I have each script display their respective letters in a custom dialog box.

 

Enter browse mode. Create a new record, if necessary. Click the dropdown field. Choose a script. Click the button. The selected script is performed.

 

Obviously, you can modify this basic template as much as necessary. This will create a framework which you can work with.

Share this post


Link to post
Share on other sites
Ender

It may have been easier to simply type the script code (or post a screenshot of the script). As it is, I have some questions about the syntax (or directions).

 

Create a new text field called Dropdown. File > Define > Database. Enter the field name. Create > OK.

You might specify that the field used for this should have global storage.

 

Double-click If > Specify. Enter the calculation If(DROPDOWN::Dropdown=”Script A”;1;0).

Why have an If() within the If[] script step? Why not just put the test in there. If the test is true, the If[] condition is met.

 

Select the bottom End If, Double Click Insert Calculated Result. Check Go to target field. Choose DROPDOWN > OK.

 

Click Calculated Result: Specify…. Type “” > OK.

I'd recommend using Set Field[] instead of Insert Calculated Result[] in almost all cases. Insert Calculated Result[] requires the field be on the layout, where Set Field[] does not.

 

This could especially be a problem in this case, where sub-scripts could take the user to a layout or process where the dropdown navigation is not available.

 

You could just leave the selected dropdown value as it is, since it might be useful as a breadcrumb of where the user currently is.

Share this post


Link to post
Share on other sites
This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...

Important Information

Terms of Use