Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help on formula 1

Status
Not open for further replies.

vega83

Programmer
Jun 12, 2008
141
US
Friends I need some help on formula I am trying to create

I have a field which is like a message

Tickets are sold for less price , etc.
SO if my message has word sold I need to hilight it in red, just that one word. Any help please?

Vega
 
Try something like this and format the formula by going to format field->paragraph->text interpretation->HTML text:

left({table.message},instr({table.message},"sold")-1)+"<font color=red>"+"sold"+"</font color>"+mid({table.message},instr({table.message},"sold")+5)

-LB
 
LB is there a way i can check for case senstive or like word

example Sold, sold, solden etc?
 
I got it, i used lower case fun and if condition thanks!
 
stringvar x := {table.message};
stringvar y := "sold";
if ucase(x) like "*"+y+"*" then
left(x,instr(ucase(x),ucase(y))-1)+
"<font color=red>"+y+"</font color>"+
mid(x,instr(ucase(x),ucase(y))+len(ucase(y)))

This would just color the "sold" in "solden" though.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top