I am performing a find using Script step ....
When searching for 'John' , it returns 'John Nash' , 'Paul Johnson' etc .... I need the script to find only whole word results ...
How can I specify that in a script step - perform find ?
Enter Find Mode
Set Field [ Table::field ; "=" & yourString ]
Sent from my iPhone
say you have 3 records having in the FullName field: john, johnes, john nash
In find mode,
will find 3 records: john, john nash, johnes (substring at any word start must match)
will find 2 records: john, john nash (entire word must match)
will only find 1 record: john (entire field must match)
Finding (manually or scripted) may be slightly different in FMP than in other applications. See the Help topic
But in addition, it's always beneficial to know that a 'begins-with', case-insensitive search is performed (unless the default indexing has been changed). And begins-with is performed on each word in the field. Using the symbols gives us the ability to be a little more specific. The choice to do "AND", "OR" & "NOT" searches is a little more complex, but also do-able. We have the Constrain and Extend (and pull back the last find with Modify Find). All pretty powerful.
I tend to think of the GTRR (Go to Related Records) is also a "find", it just uses relationships.
The New Record/Request can be a key in making AND/OR/NOT finds.
1. AND (single field):
add each 'word' or phrase with or without the wildcards, separated with spaces. The order does not matter
2. AND (multiple fields):
put the criteria into each field as needed
3. OR (single field/multiple fields):
add a new request
4. combining AND & OR - yes more complex!
5. NOT (with or without AND, OR) - is done with the OMIT and all omits must be at the bottom of the other requests. Constrain Found is also quite helpful in omitting from a previous find.
Retrieving data ...