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

Remove HTML information from a field

Status
Not open for further replies.

tonykblen

Programmer
Mar 25, 2003
88
IE
Hi,

I am looking for a simple formula that will strip out HTML code from a field of datatype memo. This includes removing characters like   etc.

Does anyone know of an easy way around this?

Many thanks in advance for yuor help.

Tony.

Tony Kennedy BSc. B.I.S.,
MCSA Cand.

A good start is half the work.
Every start is difficult .
-Two Gaelic proverbs
 
What version of CR?

CR 8.5 or below can't use memo fields in formulas, so you'll need to do this with a SQL Expression, or within a View or SP on the database.

A SQL Expression is based on the database you're using.

SQL Server uses the REPLACE function (see below).

Either 8.5 or 9 can use Html formatting (right click the field and select Format Field->Paragraph Formatting->Text Interpretation->Html).

This will use the HTML.

etc. and other words would have to be ripped out of the formula manually, again this is version dependent.

In CR 9 (and SQL Server SQL Expressions) use the replace function:

replace({table.field},"etc.","")

-k
 
Hi,

It is CR 7.0 unfortunately :0(

Is there any example code on how to set this up?

Many thanks for your help,

Tony.

Tony Kennedy BSc. B.I.S.,
MCSA Cand.

A good start is half the work.
Every start is difficult .
-Two Gaelic proverbs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top