1. Define a global field (e.g., "Input").
2. Use the Custom Dialog script step to enter the terms you want to search
into the field "Input".
3. Use the Find/Replace script step to search for any occurrence of the
contents of "Input" across all fields.
Alternately, instead of Custom Dialog, put "Input" on a layout for user
entry, with a button that activates step 3, above.
If you need to look for multiple words in one search, you'll have to parse
"Input" into separate words and do a script that steps through each word.
You could use spaces between individual words as a delimiter, but searching
for a term of multiple words would require some other speciifc delimiter.
Matt
> 3. Use the Find/Replace script step to search for any occurrence of the
> contents of "Input" across all fields.
This only finds me one by one each record that has an occurrence. It does
not make a selection of all records to browse. And that is needed....
In my oldfashioned dbf database prog, i could give any string and the prog
did search the whole db (all fields and all records) for that - making a
complete selection. I am sure FMP must be able to do that also?!?!?!
I went to work and made a script that went into "Find" mode and than one by
one enters the desired string into each appropiate field (made a dialog and
an "input" field in which i placed the string - "copy / paste" in each
field - "go to field[next]" - at the end i let it perform the "Find"
command).
But the problem is that i cannot switch from the first request to a next
request automatically. So with a script, i can only fill each field in Find
mode with my textstring IN ONE AND THE SAME REQUEST. So my search is only
positive if my textstring occurs in EACH field.
So i cannot get on with this approach either.... Or is there a scriptstep to
go from one request to the next. I cannot get it to work with "Go to
record/request/page".
Regards
Hans
Marc-Andr? Paiement - 29 Feb 2004 19:32 GMT
> > 3. Use the Find/Replace script step to search for any occurrence of the
> > contents of "Input" across all fields.
[quoted text clipped - 18 lines]
> go from one request to the next. I cannot get it to work with "Go to
> record/request/page".
Hello,
The script step is New record/request. So your script should look something
like:
enter find mode
set field (field_a) (global imput)
new record/reqest
set field (field_b) (global imput)
new record/reqest
set field (field_c) (global imput)
etc
perform find
go to layout x
view as list
Another way to search different fields at once is to create a caculated
field that concatenates all the differenet fields (something like: field_a &
" " field_b & " " field_c & " " field_d & field_e) and then performs your
finds on this field. But this is only possible if the total lenght of all
your fields concatenated together doesn't exceed the 64 000 caracters limit.
HTH
Marc-Andr? Paiement
> Regards
> Hans
Marc-Andr? Paiement - 29 Feb 2004 19:37 GMT
> Another way to search different fields at once is to create a caculated
> field that concatenates all the differenet fields (something like: field_a &
> " " field_b & " " field_c & " " field_d & field_e) and then performs your
> finds on this field. But this is only possible if the total lenght of all
> your fields concatenated together doesn't exceed the 64 000 caracters limit.
Sorry, that should read:
field_a & " " & field_b & " " & field_c & " " & field_d & " " & field_e
ano - 29 Feb 2004 21:11 GMT
> Hello,
> The script step is New record/request. So your script should look something
[quoted text clipped - 10 lines]
> go to layout x
> view as list
Marc,
I tried this one with "new request" (i did not find it at first in the
script-listing).
AND IT WORKS as far as i can see now!!!!!
Many thanks!!!!
Hans
Matt Wills - 29 Feb 2004 20:00 GMT
> > 3. Use the Find/Replace script step to search for any occurrence of the
> > contents of "Input" across all fields.
>
> This only finds me one by one each record that has an occurrence. It does
> not make a selection of all records to browse. And that is needed....
So now we're back to a standard Find using multiple find requests created by
the script.
You're looking for the occurrence of one word over several fields. For each
field in which the word might appear, make a new find request and paste the
sought value into the appropriate field.
Enter Find mode
Paste Sought Value into Field A
New Record/Request
Paste Sought Value into Field B
New Record/Request
Paste Sought Value into Field C
Perform Find
Don't forget that the field has to be on the layout in order to perform a
find on it. For this reason, I will create a layout that contains all
fields in my file, switch to that layout to perform the search, then back to
my display layout. You don't even notice it happening. Either that, or put
"invisible" placements of the fields on a layout.
Matt