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

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

Recommended Posts

Posted

Friends:

I've been searching but not finding how to do a simple find script to attach to a button as follows:

Show all the records (so we know we are searching the whole database) then Find all the records where the field "products" contains the text  "film"

Thanks in advance for your help,

Migs

Posted

Hi Migs,

You don't need to Find All records first. Find begins its process searching all records.

So, simply enter find mode and enter "film" in your products field. Then, click Perform Find.

To script it "Find":

Set error capture on

Enter Find Mode (pause)

//user enters criteria

Perform Find

//error capture here..do what you want if no records found. Show a custom dialog...find all...

Posted

Hi bcooney.  I'm most grateful for your answer, but I wish it to be a script that I will call from a button.  I don't want that interactive search because it implies typing the search text over and over again.  So if I have a button that is labeled "Find all records with film" (in the field named "products") it would be better.

Thanks for your help

Migs

Posted

Slightly different.   

Set Error Capture [On]

Enter Find Mode [ ] //no pause

Set Field [YourTable::Products; "film"]

Perform Find [ ] 

I wouldn't label a button "Find all records with film", instead I would make it a global search field, dropdown, attached to a value list.  Then the user can select from a number of different values to do searches.  That would be the first upgrade.  But more info would be needed.

The more advanced upgrade would be a small full search card window that would give the user multiple ways to search the database, by words, dates, etc.

But more to your original post, a user should have enough FileMaker basics to be able to:  Ctrl+F (to enter find mode), type 'film' into the proper field and hit Return to perform a find.

Posted

Hi Steve

Thank you very much for your help.

In the Set Field step I can only get as far as 

Set Field [YourTable::Products]

But I can't figure out how to add         ;"film"      into the the equation.

Any ideas?

Gratefully

Migs

Posted

click on the gear icon at the end of the script step. click on Calculated Result "Specify"  and enter "film" in the Specify Calculation dialog.

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