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

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

Recommended Posts

  • Newbies
Posted

I am trying to do a quick find script that only shows records where the Company Field Matches the CompanySort Field, which is a global variable, preferably with only that exact match. Both fields are text fields. I am also having this problem with finding records between two dates, which are also global variables. It says "No Records Match This Find Criteria". I have the drop down for CompanySort populated by all the values for the Company field. Date, Start Date, and End Date are all set to be Date Fields.

Ry4w4uX.png

None of these Company searches work.

gK4xH86.png

 

The second one for the Company,  "Exact ( Budget::Company ; Budget::CompanySort )" will pull up records, but they are completely wrong and the same 11 records each time. I filtered by company ABC

R6WtbX8.png

Thanks for all your help.

Posted

I am trying to do a quick find script that only shows records where the Company Field Matches the CompanySort Field, which is a global variable, preferably with only that exact match.

 

Quick find searches across all fields in the current layout that are enabled for quick find. If you want to search a specific field, do not use Quick find. Try instead =

Enter Find Mode [ ]
Set Field [ Company ; CompanySort ]
Perform Find [ ]

or, for an exact match:

Enter Find Mode [ ]
Set Field [ Company ; "==" & CompanySort ]
Perform Find [ ]

See here for more options:

http://www.filemaker.com/help/13/fmp/en/html/find_sort.5.6.html#1050963

 

 

Another way is to use (only) the Perform Find script step, with stored find request/s - see:

http://www.filemaker.com/help/13/fmp/en/html/non_toc.46.45.html#1029788

 

 

---

P.S. In Filemaker, a field is one thing, and a variable is another.

  • Like 1
Posted

A Quick Find doesn't re-evaluate your calculation from the context of each record checking for a True (1) or False (0) result. A Quick Find searches for fields with contents matching whatever the result of that calculation is. So if "Exact ( Budget::Company ; Budget::CompanySort )" returns True (1) for the current record at the start of the Quick Find, it should match records that contain a 1 in them somewhere, not records where the Budget::Company and Budget::CompanySort fields have the same contents.

 

It doesn't sound like Quick Find is what you want. Quick Find will find any records where any field on the layout contains your search string. You can tweak this by omitting fields from Quick Finds in layout mode on the Inspector palette > Data tab. If you have any fields you want to include in the Quick Find, but not show them to the user, you can include them in the non-visible part of the layout.

 

For the company find, this is what you want:

 

Set Variable [$companyToFind; Value:Budget::CompanySort]

Enter Find Mode

Set Field [budget::Company; Value:"==" & $companyToFind // "==" tells FileMaker you want exact matches only]

Perform Find []

 

For the date range, you want this:

 

Enter Find Mode

Set Field [budget::Date; Value: $startDate & "..." & $endDate] // "..." tells FileMaker you want a range of values]

Perform Find []

  • Like 1
  • Newbies
Posted

Thank you, you are both lifesavers. I also was able to use the knowledge you gave me to create a script that filters by both date and company.

This topic is 3799 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.