Does the text in the review field need to be editable?
Do you have FileMaker Pro Advanced?
The text in the review field does not need to be edited.
I do not have FileMaker Pro Advanced; just the basic FM Pro 11.
With Advanced you can add a custom function to your file that can highlight every instance of a record in a field by giving it a distinctive text style. Without advanced, a looping script can do the same.
Set up a scripted find for this where the user enters or selects the word in a global text field and then clicks a button to perform a script to find records containing that text: Scripted Find Examples
Then set up a looping script:
Set vairable [$Occurrences ; value: PatternCount ( YouTable::Review ) ]
Set variable [$L ; value: Length ( Globals::gSearchText ) //This is your global search field used in the find script]
Set Variable [$Lrev ; value: Length ( YourTable::Review ) ]
Set Variable [$K ; $K + 1 ]
Exit Loop If [ $K > $Occurrences ]
SetField [ $Start ; value: Position ( YourTable::Review ; 1 ; $K ) ]
Set Field [YourTable::Review ;
Left ( YourTable::Review ; $LeftText ) & TextColor ( Middle ( YourTable::Review ; $Start ; $L ) ; RGB ( 255 ; 0 ; 0 ) ) &
Right ( YourTable::Review ; $Lrev - $Start - $L ) ]
- This script has not been tested so adjustments may be needed--especiall in the set field calculation.
- It may occur to you that Substitute could be used for this purpose, but substitute is case sensitive--making it difficult to match to all possible capitalizations of the search text.
- TextColorRemove can be used to clear the red text out before the user performs a new find to find records using different search text.
Many thanks. I'll try that and let you know the outcome.