stevebull Posted November 4, 2009 Posted November 4, 2009 I am trying to do a find replace in one of the fields to change a key word from black to red and in bold. there are 1500 records with this word in so unless a find replace commeand would work it will be an arduous task. Is anyone able to offer some suggestions on how I can resolve this. Thanks-
LaRetta Posted November 4, 2009 Posted November 4, 2009 (edited) Hi Steve, welcome to FM Forums! One problem with coloring actual text is that it will remain until you remove it again. And it can end up all through your text, and the red will produce grey when printed black and white and so forth. Neither would I loop and replace; as you see it'd be a headache. I would use a global text field to hold your word. Then you can create a calculation (result is text) with: Substitute ( text ; gWord ; TextStyleAdd ( TextColor ( gWord; RGB ( 255 ; 0; 0) ) ; Bold ) ) It will always change automatically for you in this calculation field. If you truly want the text itself to change, you can use the calculation on the text field as auto-enter (replace) but you must include removing the formatting if you blank the global as: Case ( IsEmpty ( gWord ) ; TextFormatRemove ( text ) ; Substitute ( text ; gWord ; TextStyleAdd ( TextColor ( gWord; RGB ( 255 ; 0; 0) ) ; Bold ) ) ) UPDATE: If this file is served, the global value will be user-specific and the value will not persist when the file is closed. If the styled text must remain, you need to use the first calc instead. But as you change words, all prior words in the global will remain. Play with it to find out exactly what you need. Edited November 4, 2009 by Guest Added update
Lee Smith Posted November 4, 2009 Posted November 4, 2009 Hi Steve, and welcome to the Forum, Maybe this file shows what you are looking for. Automatically Highlighting All Occurrences of a User-Specified Text String. by Ray J. Cologon, NightWing Enterprises. HTH Lee
Recommended Posts
This topic is 5557 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 accountSign in
Already have an account? Sign in here.
Sign In Now