Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7534 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Is there any easy way to create a script to find all of one name in a database and change the text color for just that name??

For example, I have a database that gets the names of people from a value list. The names are formatted title case and all black. I want to find all Joe's and change to red color.

could someone tell me how to do this??

I am going through database now and changing each occurence of Joe manually.

Thanks

Larry

FileMaker Version: 6

Platform: Windows 95/98

Posted

Theoretically you do this with a simple Find/Replace

Find: <Name>

Replace With: TextColor ( <Name> ; RGB ( 255 ; 0 ; 0 ) )

Though I can't get that to actually work. Maybe the text color feature doesn't work in Find/Replace. Instead you could create a global that will contain your search text, then script the replacement:

Go to Record/Request/Page [ First ]

Loop

Set Field [ MyField, Substitute( MyTable::MyField; MyTable::Search Text; TextColor ( MyTable::Search Text ; RGB ( 255 ; 0 ; 0 ) )) ]

Go to Record/Request/Page [ Exit after last , Next ]

End Loop

This will replace the actual field contents with the colors of the search text. You should consider just using a calc field that shows the highlighted color on those layouts that need it, instead of replacing the data.

This topic is 7534 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.