Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hello

I have a field "country" and I have three layouts that deal with those countries

the layouts are America, Canada, Mexico

I would like to know how to make a drop down menu that would automatically go to that layout when selected in the dropdown menu.

Thanks

If[ Table::Country = "America" ]

Go To Layout [Layout pertaining to America]

Else If [ Table::Country = "Canada" ]

Go To Layout [Layout pertaining to Canadia ;)]

Else If [ Table::Country = "Mexico" ]

Go To Layout [Layout pertaining to Mexico]

Else

Show Custom Dialogue [ "Error" ; "You haven't selected a valid country"]

End If

The user must press a button following selection from drop box, filemaker has no inbuilt on event functions so if your desperate you'll have to use a plug-in, if you can though, do without it, its far to much effort.

Also note that my syntax isnt perfect...

~Genx

~Genx

...twice the me for twice the fun

~Genx

Well heck, if the layouts are named the country (exactly) then it can be simple:

Go to Layout [ Layout Name by calculation = CountryField ]

... only one script step ...

So you don't even need a drop-down or popup to fire the script or make the selection, because the RECORD tells you the country, right? Just place a generic button, attach this script-step and go.

Update: And by pulling in script parameters (which can identify which layout you are coming from); as well as utilizing the power of script variables, you can really make the process dynamic, ie:

If coming from a layout which starts with the word "List" ; go to the layout named "America List" ; if coming from layout which starts with word "Detail" ; go to the layout named "America Detail" and so forth ...

:wink2:

Edited by Guest
Added Update

..If Laretta... If...

Read the first sentence, second line of the first post. Even if I hadn't added my update, my response fit the need exactly as requested. But I even went further and explained that the calc I presented was an example ONLY if there was an exact match. The purpose of the example was to provide correct syntax of the CONCEPT.

I take my responses seriously - this is other people's data and businesses we are dealing with and, although we have fun here, it is very important that we provide accurate and tested answers. Oh. And my name is LaRetta not Laretta ...

:smirk:

Lol, fair enough, point taken, i stand corrected as always.

In this case though, what was wrong with my answer?

~Genx

Edited by Guest
question added

I didn't say there was anything wrong with your answer. I saw a way of saving him 8 lines of code, eliminating the drop-down, AND the plugin. And I wanted to introduce the calculation concept for further flexibility. :smirk:

The questioning of your syntax was in one of your OWN posts, not mine ... :crazy2:

Rightio, good thinking, sorry i'm a bit of an A**hole sometimes, i should really stop doing that. Oh well, my appologies

~Genx

LaRetta and Genex,

Thanks for this post. It gave me a new direction with a problem I have been having with a system I am currently building. Thanks again guys.

Kasei

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.