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.

Passing one find request into two fields

Featured Replies

Simple question - I want to search for a particular year in two related tables and then display all the results where data from the tables corresponds to a particular year. Right now I have a script that prompts the user to select a year for one of the searches and then I force it to Constrain the found set to records where the related table has the data "2006". I'd like to make that a variable so the script will continue to be accurate for any year choice.

Edited by Guest

... How is your user "selecting the year"?

Assuming you want a quick answer, umm, ill try interpret your question. You want to prompt a user for a particular date and then do all your searches with this date.

All we need is two things: a) a global field so the user can be prompted and the data can be accessed throughout the script no matter the location within your database. :) to understand the script syntax.

I'm unsure of how your currently prompting your user for a year, so thats really up to you, as long as the data they are prompted for is entered into our global field which we'll call gNumber.

Now, for the find script, it is simple once you understand the syntax. Do not specify manual criteria!

EXAMPLE

Enter Find Mode []

Set Field [Pets ; "Dogs"]

Perform Find []

Enter Find Mode []

Set Field [Owners ; "William"]

Constrain Found Set []

The above example, would find all dog records, where the owner is william. But note that instead of having text, you can supplement your gNumber field, which stores your year.

~Genx

  • Author

the script sends the user to a layout with just one field for the year that is a drop down list. They select the year and then hit continue to go on with the search. My filemaker help says that "You can't use a global field to find records" can I use variables instead?

  • 2 weeks later...

Your filemaker help is lieing to you... decietful decietful filemaker help!

Well no, you can't actually search within a global field. You can however pull a value from that global field to search over other fields.

Hence the point of the Set Field script step. You are setting a non-global field equal to the value within the global...

~Genx

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.