PC Review


Reply
Thread Tools Rate Thread

Conditional DRW fields

 
 
Stephen Green
Guest
Posts: n/a
 
      28th Jul 2004
I'm working on a Database Results page. The database contains contact
information and membership status.

I'd like to be able to show certain fields only if it isn't empty. And then
display a second field based on whether the first is displayed or not. For
instance:

If Membership Status <> ""
Membership Status
Level
Endif

Otherwise nothing should be displayed. Something like a missing address
line on an envelope...

Is that possible within FrontPage (2002) ?

Thanks for your help.

Stephen


 
Reply With Quote
 
 
 
 
Kathleen Anderson [MVP - FP]
Guest
Posts: n/a
 
      28th Jul 2004
Wrap the DatabaseResultsColumn in some script - like this:


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

<li><b>Municipality:</b>&nbsp;<!--webbot bot="DatabaseResultColumn"
startspan

s-columnnames="ProgramArea,RecordNum,Date,ItemNumber,SplitItem,Session,PA_SA
,ActNumber,Section,Recipient,Municipality,FundsUse,DollarField1,DollarField2
,DollarField3,DollarField4,Any_Previous,DollarField5,FundNum,AgencyNum,SID,P
roject_Num,Description"
s-column="Municipality" b-tableformat="FALSE" b-hashtml="FALSE"
clientside
preview="&lt;font
size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Municipality&lt;font
size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" b-makelink
b-MenuFormat --><%=FP_FieldVal(fp_rs,"Municipality")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="33247" --></li>

<% End If %>


You can also check the value of one field to determine whether to show
another.

--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
http://www.spiderwebwoman.com/resources/


Stephen Green <(E-Mail Removed)> wrote:
> I'm working on a Database Results page. The database contains contact
> information and membership status.
>
> I'd like to be able to show certain fields only if it isn't empty.
> And then display a second field based on whether the first is
> displayed or not. For instance:
>
> If Membership Status <> ""
> Membership Status
> Level
> Endif
>
> Otherwise nothing should be displayed. Something like a missing
> address line on an envelope...
>
> Is that possible within FrontPage (2002) ?
>
> Thanks for your help.
>
> Stephen


 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      28th Jul 2004
Hand coded, I would do the following (Example is for generating a name and address block):

<%=RS("FullName")%><br>
<%=RS("AddressLine1")%><br>
<% If RS("AddressLine2") <> "" Then %>
<%=RS("AddressLine2")%><br>
<% End If %>
<%=RS("City")%>,&nbsp;<%=RS("State")%>&nbsp;&nbsp;<%=RS("ZipCode")%>

or
<% If RS("AddressLine2") <> "" Then %>
<%=RS("FullName")%><br>
<%=RS("AddressLine1")%><br>
<%=RS("AddressLine2")%><br>
<%=RS("City")%>,&nbsp;<%=RS("State")%>&nbsp;&nbsp;<%=RS("ZipCode")%>
<% Else %>
<%=RS("FullName")%><br>
<%=RS("AddressLine1")%><br>
<%=RS("City")%>,&nbsp;<%=RS("State")%>&nbsp;&nbsp;<%=RS("ZipCode")%>
<% End If %>
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"Stephen Green" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm working on a Database Results page. The database contains contact
> information and membership status.
>
> I'd like to be able to show certain fields only if it isn't empty. And then
> display a second field based on whether the first is displayed or not. For
> instance:
>
> If Membership Status <> ""
> Membership Status
> Level
> Endif
>
> Otherwise nothing should be displayed. Something like a missing address
> line on an envelope...
>
> Is that possible within FrontPage (2002) ?
>
> Thanks for your help.
>
> Stephen
>
>



 
Reply With Quote
 
Stephen Green
Guest
Posts: n/a
 
      28th Jul 2004
Thanks Kathleen and Thomas!

I've got it working now.

Stephen

"Thomas A. Rowe" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hand coded, I would do the following (Example is for generating a name and

address block):
>
> <%=RS("FullName")%><br>
> <%=RS("AddressLine1")%><br>
> <% If RS("AddressLine2") <> "" Then %>
> <%=RS("AddressLine2")%><br>
> <% End If %>
> <%=RS("City")%>,&nbsp;<%=RS("State")%>&nbsp;&nbsp;<%=RS("ZipCode")%>
>
> or
> <% If RS("AddressLine2") <> "" Then %>
> <%=RS("FullName")%><br>
> <%=RS("AddressLine1")%><br>
> <%=RS("AddressLine2")%><br>
> <%=RS("City")%>,&nbsp;<%=RS("State")%>&nbsp;&nbsp;<%=RS("ZipCode")%>
> <% Else %>
> <%=RS("FullName")%><br>
> <%=RS("AddressLine1")%><br>
> <%=RS("City")%>,&nbsp;<%=RS("State")%>&nbsp;&nbsp;<%=RS("ZipCode")%>
> <% End If %>
> --
> ==============================================
> Thomas A. Rowe (Microsoft MVP - FrontPage)
> WEBMASTER Resources(tm)
> http://www.ycoln-resources.com
> FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> ==============================================
> To assist you in getting the best answers for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
>
> "Stephen Green" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I'm working on a Database Results page. The database contains contact
> > information and membership status.
> >
> > I'd like to be able to show certain fields only if it isn't empty. And

then
> > display a second field based on whether the first is displayed or not.

For
> > instance:
> >
> > If Membership Status <> ""
> > Membership Status
> > Level
> > Endif
> >
> > Otherwise nothing should be displayed. Something like a missing address
> > line on an envelope...
> >
> > Is that possible within FrontPage (2002) ?
> >
> > Thanks for your help.
> >
> > Stephen
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Fields =?Utf-8?B?Umljaw==?= Microsoft Access Forms 5 1st Feb 2007 10:18 PM
Conditional Fields =?Utf-8?B?Umljaw==?= Microsoft Access Forms 5 1st Feb 2007 06:21 AM
Conditional fields =?Utf-8?B?SXNsYW5kIEdpcmw=?= Microsoft Word New Users 5 18th Apr 2006 12:56 AM
Conditional Fields =?Utf-8?B?RGF2ZUNQQQ==?= Microsoft Excel Misc 0 21st Sep 2005 10:37 PM
Conditional fields =?Utf-8?B?Q29ubmll?= Microsoft Access Form Coding 4 5th Apr 2005 04:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:33 AM.