Brian Dunning's FileMaker Custom Functions

cfHiliteText ( text ; searchText ; colorRGB ; textStyle )

a customFunction for hiliting text in a field with following advantages:

  Average rating: 3.7 (39 votes) Log in to vote

Martin D. Brunner   Martin D. Brunner - Show more from this author
-
http://-

Share on Facebook Share on Twitter

  Sample input:
cfHiliteText("This is no JavaScript."; "java Is"; RGB( 255 ; 0; 0 ) ; bold)
  Sample output:
This {is} no {Java}Script.

Values in curly braces are formatted red and bold.

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

A very fast customFunction for hiliting text in a field with following advantages:
- not case sensitive
- skipped/disordered words in a search string

originally developed by Felix Hausberner, Germany
textstyle added by Martin D. Brunner, Switzerland

syntax: cfHiliteText( text; searchText; colorRGB ; textStyle )
calling: cfHiliteText("This is no JavaScript"; "java is"; RGB( 255 ; 0; 0 ) ; bold)
result: "This {is} no {Java}Script" where values in curly braces are red and bold.

 

Comments

gopal patel   gopal patel, Dr Patels Clinic
Jul 22, 2021
I have added hello my name is xyz my ------ and used it successfully yo highlight hello my name is xyz in RED, but the problem is if a similar word which is inside the and is also found outside like the above after my the MY also get highlighted red how to prevent that .
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: