SHOW IF statement Help

S

Simon Gare

Hi,

how could apply a 'Show IF' statement that would only show an entry if the
entry was a building name and not a number to the section below.



Example

want to show 1st line below

Heathrow Terminal 1 (This is stored in
Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)
Croydon Road
Hounslow

Dont want to show first line below

23 ( This is also stored in
Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)
South Audley Street
London
W1

Its just the numbers I dont want to show but i need to see the text.

Thanks in advance
Simon
 
M

Mike Brind

Simon said:
Hi,

how could apply a 'Show IF' statement that would only show an entry if the
entry was a building name and not a number to the section below.




Example

want to show 1st line below

Heathrow Terminal 1 (This is stored in
Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)
Croydon Road
Hounslow

Dont want to show first line below

23 ( This is also stored in
Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)
South Audley Street
London
W1

Its just the numbers I dont want to show but i need to see the text.

Thanks in advance
Simon

Regular expressions:

<%
Dim str, re, retVal
str = Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value
Set re = new RegExp
re.Pattern = "[a-z]+"
re.Global = true
re.IgnoreCase = true
retVal = re.Test(str)
If retVal = true Then Response.Write str
Set rs = Nothing
%>
 
S

Simon Gare

Thanks Mike,

Simon


Mike Brind said:
Simon said:
Hi,

how could apply a 'Show IF' statement that would only show an entry if the
entry was a building name and not a number to the section below.

<td class="Collection"><span
class="DataSetText"><%=(Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)%


Example

want to show 1st line below

Heathrow Terminal 1 (This is stored in
Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)
Croydon Road
Hounslow

Dont want to show first line below

23 ( This is also stored in
Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value)
South Audley Street
London
W1

Its just the numbers I dont want to show but i need to see the text.

Thanks in advance
Simon

Regular expressions:

<%
Dim str, re, retVal
str = Pricing.Fields.Item("COLL_BUILDING_NAME_NO").Value
Set re = new RegExp
re.Pattern = "[a-z]+"
re.Global = true
re.IgnoreCase = true
retVal = re.Test(str)
If retVal = true Then Response.Write str
Set rs = Nothing
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top