Jump to content

Passing one find request into two fields


Jacob
 Share

This topic is 5716 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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
Link to comment
Share on other sites

... 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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 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

Link to comment
Share on other sites

This topic is 5716 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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