Home All Groups Group Topic Archive Search About
Author
22 Mar 2009 2:02 PM
John P.
I have a Data Results table and some records have a field with a pdf
document hyperlinked, but not all.records have one.

Is there a way where on the hyperlink I can say show PDF link only if the
field is populated?

As at resent I have people clicking on the links (empty ones) and getting
nothing.

Thanks
John P.
Author
22 Mar 2009 2:57 PM
Kathleen Anderson
You could wrap the code in a script that tests whether or not there is
anything in that field:

here's an example:


<% If fp_rs("Municipality") > " " then %>


  <li><b>Municipality:</b> ­<!--webbot bot="DatabaseResultColumn"
startspan


s-columnnames="ProgramArea,Rec­ordNum,Date,ItemNumber,SplitIt­em,Session,PA­_SA
,ActNumber,Section,Recipient,M­unicipality,FundsUse,DollarFie­ld1,DollarFie­ld2
,DollarField3,DollarField4,Any­_Previous,DollarField5,FundNum­,AgencyNum,SI­D,P
roject_Num,Description"
    s-column="Municipality" b-tableformat="FALSE" b-hashtml="FALSE"
clientside
    preview="<font
size="-1">&lt­;&lt;</font>Municipa­lity<font
size="-1">&gt­;&gt;</font>" b-makelink
b-MenuFormat --><%=FP_FieldVal(fp_rs,"Munic­ipality")%><!--webbot
    bot="DatabaseResultColumn" endspan i-checksum="33247" --></li>


  <% End If %>




--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
Expression Web Resources: http://www.spiderwebwoman.com/xweb/
Expression Web Wiki: http://expression-web-wiki.com/
FrontPage Resources: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others


Show quoteHide quote
"John P." <park***@gmail.com> wrote in message
news:e9pqGbvqJHA.3992@TK2MSFTNGP04.phx.gbl...
>I have a Data Results table and some records have a field with a pdf
>document hyperlinked, but not all.records have one.
>
> Is there a way where on the hyperlink I can say show PDF link only if the
> field is populated?
>
> As at resent I have people clicking on the links (empty ones) and getting
> nothing.
>
> Thanks
> John P.
>
Are all your drivers up to date? click for free checkup

Author
23 Mar 2009 8:29 AM
Stefan B Rusynko
PS
- the test you posted only checks if the field is greater than a space  " "
<% If fp_rs("Municipality") > " " then %>

Better to use a test for an empty record as

<% If fp_rs("Municipality")<> "" Then %>

Or

<% If Len(fp_rs("Municipality")>0 Then %>




--

_____________________________________________
SBR @ ENJOY (-:              [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!"  (-;
_____________________________________________


Show quoteHide quote
"Kathleen Anderson" <kander***@remove.mvps.org> wrote in message news:O$OH45vqJHA.3700@TK2MSFTNGP06.phx.gbl...
| You could wrap the code in a script that tests whether or not there is
| anything in that field:
|
| here's an example:
|
|
| <% If fp_rs("Municipality") > " " then %>
|
|
|  <li><b>Municipality:</b> ­<!--webbot bot="DatabaseResultColumn"
| startspan
|
|
| s-columnnames="ProgramArea,Rec­ordNum,Date,ItemNumber,SplitIt­em,Session,PA­_SA
| ,ActNumber,Section,Recipient,M­unicipality,FundsUse,DollarFie­ld1,DollarFie­ld2
| ,DollarField3,DollarField4,Any­_Previous,DollarField5,FundNum­,AgencyNum,SI­D,P
| roject_Num,Description"
|    s-column="Municipality" b-tableformat="FALSE" b-hashtml="FALSE"
| clientside
|    preview="<font
| size="-1">&lt­;&lt;</font>Municipa­lity<font
| size="-1">&gt­;&gt;</font>" b-makelink
| b-MenuFormat --><%=FP_FieldVal(fp_rs,"Munic­ipality")%><!--webbot
|    bot="DatabaseResultColumn" endspan i-checksum="33247" --></li>
|
|
|  <% End If %>
|
|
|
|
| --
|
| ~ Kathleen Anderson
| Microsoft MVP - FrontPage
| Spider Web Woman Designs
| Expression Web Resources: http://www.spiderwebwoman.com/xweb/
| Expression Web Wiki: http://expression-web-wiki.com/
| FrontPage Resources: http://www.spiderwebwoman.com/resources/
| Please reply to the newsgroup for the benefit of others
|
|
| "John P." <park***@gmail.com> wrote in message
| news:e9pqGbvqJHA.3992@TK2MSFTNGP04.phx.gbl...
| >I have a Data Results table and some records have a field with a pdf
| >document hyperlinked, but not all.records have one.
| >
| > Is there a way where on the hyperlink I can say show PDF link only if the
| > field is populated?
| >
| > As at resent I have people clicking on the links (empty ones) and getting
| > nothing.
| >
| > Thanks
| > John P.
| >
|
|

Bookmark and Share