Ask a Question related to FileMaker, Design and Development.
-
Carlo #1
Solution for the question: Select a single word in a text field after a search
In Filemaker 6:
Define a global field named "gSearched_word" to store word that you
want to find.
Make a script to enter in find mode as below:
Script 1
Go to Layout ("mySearchLayout")
Enter Find Mode (Pause)
Set Field("gSearched_word)", "myField")
Perform Find(Replace Found Set") (or other option)
Go to Layout("myResultLayout")
Perform Find/Replace("gSearched_word", " ", "Find next") (see other
option on "Find next" parameter, ecc)
Make a new script to hilite the next occurence of word
Script 2
Perform Find/Replace("gSearched_word", " ", "Find next")
Insert a button to perform this script in "myResultLayout"
That's all.
Bye. Carlo
Carlo Guest
-
Search database fields using single text field
Kindly advise on how to develop a database search page such that there is single text field to enter serach string and the results are shown on the... -
form: single line -- multiple text boxes -- one typing field - how?
please excuse my ignorance. am a newbie. I saw a fillable form, that shows:- a single line with multiple text boxes for entering each letter of a... -
static text: single word rollover state?
i know you can attach a link to a selected word in a static text field, just wondering if it's possible to select one word out of a static text field... -
Select from a text field!
Hello all, I have in a form a textarea field with a lot of lines in it (records) I want to know if there is any way to select the line I want by... -
Select a single word in a text field after a search
in article PvMJa.17242$dP1.32589@newsc.telia.net, nisse@nisse.se at nisse@nisse.se wrote on 6/23/03 4:59 PM: If you're on the Mac sind, and... -
Bridget Eley #2
Re: Solution for the question: Select a single word in a textfield after a search
Hi Carlo
Unlike find, find/replace is not taken out by edit only privileges (although
password privileges still apply with regard to modifying records) which
makes me wonder why you would ever need to script something like this.
Command-Shift-F (or equiv Windows shortcut) will bring up the find/replace
dialog and find the first instance, while Command-G (or equiv Windows
shortcut) will find the next instance (even after you have closed the dialog
box).
However, if there really is a reason why you must do it this way, why not
make use of a custom dialog in your script. Values can be entered into
global fields via the dialog, doing away with the need for extra layouts.
Also, a loop and a pause/resume script step would allow users to use the
Enter key to view each instance of the search string, instead of having to
click a button each time.
Set Field [ gText1, "" ]
Show Custom Dialog [ Title: ³SEARCH STRING²; Message: ³Enter search
string.²; Buttons: ³OK², ³Cancel², ³²; Input #1:
gText1, ³Search String² ]
If [ Status(CurrentMessageChoice) = 1 ]
Enter Find Mode
Set Field [ text, gText1 ]
Perform Find [ Replace Found Set ]
Loop
Perform Find/Replace [ Find: gText1; Replace: ; Search operation: Find Next;
Search settings: Forward; Search across: All records/requests; Search
within: All fields ]
Pause/resume []
End Loop
End If
NB: This script would be improved by error checking for no records found,
and by giving the user the choice to modify search criteria, and to replace,
constrain or extend the found set, but I have kept it simple here for the
sake of clarity.
Bridget Eley
in article [email]9b1b0094.0307300311.2ae8873f@posting.google.com[/email], Carlo at
[email]ercar@hostlcnet.it[/email] wrote on 30/7/03 9:11 PM:
> In Filemaker 6:
> Define a global field named "gSearched_word" to store word that you
> want to find.
>
> Make a script to enter in find mode as below:
>
> Script 1
> Go to Layout ("mySearchLayout")
> Enter Find Mode (Pause)
> Set Field("gSearched_word)", "myField")
> Perform Find(Replace Found Set") (or other option)
> Go to Layout("myResultLayout")
> Perform Find/Replace("gSearched_word", " ", "Find next") (see other
> option on "Find next" parameter, ecc)
>
> Make a new script to hilite the next occurence of word
> Script 2
> Perform Find/Replace("gSearched_word", " ", "Find next")
>
> Insert a button to perform this script in "myResultLayout"
> That's all.
> Bye. CarloBridget Eley Guest
-
Carlo #3
Re: Solution for the question: Select a single word in a text field after a search
Your script is very useful. Thank you Bridget
Best regard
Carlo
Carlo Guest
-
Hans #4
Re: Solution for the question: Select a single word in a textfield after a search
Dear Bridget,
Thanks for this elegant solution! (Even after al these years!)
Best regards, Hans
[QUOTE=Bridget Eley;348216]Hi Carlo
Unlike find, find/replace is not taken out by edit only privileges (although
password privileges still apply with regard to modifying records) which
makes me wonder why you would ever need to script something like this.
Command-Shift-F (or equiv Windows shortcut) will bring up the find/replace
dialog and find the first instance, while Command-G (or equiv Windows
shortcut) will find the next instance (even after you have closed the dialog
box).
However, if there really is a reason why you must do it this way, why not
make use of a custom dialog in your script. Values can be entered into
global fields via the dialog, doing away with the need for extra layouts.
Also, a loop and a pause/resume script step would allow users to use the
Enter key to view each instance of the search string, instead of having to
click a button each time.Hans Guest



Reply With Quote

