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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting Certain Words in a Free Form Field 1

Status
Not open for further replies.

NavyFederalDetta

Technical User
Mar 22, 2006
16
I would like to suppress certain words from a free form field. Ex., we have an application that has an auto-fill for the initial step ("0 :pEM:"). I would like to suppress just that value throughout the field but leave all other text in tact. Is there a formula I can write in order to accomplish this?

Thank you!!!
 
Yes, do a replace in a formula field and then display that field. E.g.
Code:
Replace({your.field}, "0 :PEM:", "")

This can also be used to turn it into something else, say
Code:
Replace({your.field}, "0 :PEM:", "[Auto-Fill]")

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thank you!! Is there a code for a hard return? It actually reads
0
:pEM: (text)...

I was able to get rid of the ":pEM:" part but not in connection with the 0.
 
Try Chr(10) and Chr(13)

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Crystal doesn't like this. I get messages like "the ) is missing," .

I am writing Replace ({HPD_HelpDesk.Work Log}, "0" chr (13), "")

If I include it in the quotes it looks for that exact string. If I don't I get the error message.

any ideas?

Thank you!
 
I just decided to set up two separate formulas. The first one takes out the "O", the second one uses the first one then takes out the ":pEM:".

Thank you for all your assistance!!
 
Replace ({HPD_HelpDesk.Work Log}, "0"+chr (10)+":pEM: Added to by NetCmmnd, ", "")

This got rid of the blank line that I was struggling with. Chr (10) is "new line".


above is the final code used and it worked like a charm!!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top