Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using variables to find records 1

Status
Not open for further replies.

nicruediger

Programmer
Nov 2, 2001
2
DE
I'm new at filemaker pro 8.5. I want to search records using a field 'names' but entering the searchstring using a variable $$mystring. I dont know how, please help!
Thank you.
Nic
 
Hello Nic,

I assume you want to script the search. Try a script something like this:

Enter Find Mode
Set Field ["names";$$mystring]
Perform Find

The Set Field command of course works in the BROWSE mode but for people new to Filemaker, it is not so obvious that it also works in the FIND mode. It populates the field with the term that you are searching for.

Does this help?

-Striker
 
Also remember that when you set your "$$mystring" variable, that it's a global variable and will be available as long as the application is open (and will contain that same value, unless you reset it somewhere else).

If you aren't going to need that variable value outside of the script you are using, use a script variable (only one dollar sign ... $mystring ) instead. It goes away when the script finishes, which is helpful if you name your variables similarly, or if you duplicate scripts for reuse and forget to comment out or change the variable name.

Sorry for jumping in TStriker ... just thought I'd add my $0.02.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top