Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

How do I do Omit finds In Global Field Transfer Finds?


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

Recommended Posts

Posted

I'm assuming that you are using a script to go into find mode and then copy the global values into the appropriate fields.

Create an additional global field set up as a check box to allow the user to select 'omit' or not. When you execute the search, test the value of the omit global. If it is checked then execute an Omit Record/Request step in the script before you do the perform find step. If you want to select or omit multiple combinations of criteria, you will need an additional global omit field for each global search field. Then you will have to set up multiple search and omit requests in your search script. Exactly how you set this up will depend on how sophisticated you want the user's search options to be.

Posted

Thanks for the response Bob. But does this mean that I can't use the "simple" find functions built into FMP already, such as multiple find requests, without having to create additional global variables such as FirstNameSearch1, FirstNameSearch2, etc.? So then basically the user's search options will be limited to how many I predetermine in the global fields?

Posted

Consider the following:

Scenario 1

Search for all records whose First Name = "Bob" and omit records whose Last Name = "Weaver"

Scenario 2

Search for all records whose Last Name = "Weaver" and omit records whose First Name = "Bob"

Do you want to allow the user these kinds of searches? Both have the same field values, and include one find criterion and one omit criterion. Yet, they should produce different results. You have to decide just how complex you want the searches to be. The amount of information you need to get from the user will increase with the complexity.

Can you describe in more detail what sort of searches you want the user to do?

Posted

Ok, here's what I tried to do. I'm creating a database of students in our tutoring organization. It's a relational database with Tutee and TuteeProgramHistory (TPH), where Tutee has a portal to TPH to show multiple entries. However, regular searching will produce awkward results (searching for Fall 2001 students will yield me students from our Fall 2000 and Spring 2001 programs, since the search looks for any instance in any row of the portal). I tried to solve this problem by using global fields to create a hashed field (if the user wanted to find students for a particular semester and year, then through a calculation I would combine their query to a field called SemesterAndYear, instead of having two separate variables and thus allowing it to look for a combination in the rows. However, then I realized I can't really use the built in functions for searching. A definite goal of the database is to allow the user to search for all students enrolled in our Spring 2001 General Tutorial program but omit everyone from any Fall 2000 programs. The tutee database will be mainly used to autogenerate letters, create roster sheets, and create mailing labels and name tags. And all this relies on the ability to sort out those that are not in a specific tutorial program or a specific semester. Hope this clarifies to you what I'm trying to accomplish.

Posted

Doing finds in related records, as you have discovered, can lead to bizarre results.

You should set up a calculated field in the related file like so:

YearSemester = Year & Semester

Then, put that field on the layout in your main file. Use it for searching. It should produce the results you want.

Posted

I was trying to avoid doing something that would make the find page so messy, but I guess I can't avoid it. Thanks Bob for all your help.

Posted

There are a number of ways to keep the layout looking clean. Try using separate year and semester global fields, and don't display the related yearsemester calculated field. You can make a "Find" button script that does this:

Go to Find mode [no restore]

Set Field [TPH::yearsemester = year & semester]

Perform Find [no restore]

[ March 29, 2001: Message edited by: BobWeaver ]

This topic is 8640 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
×
×
  • Create New...

Important Information

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