making fields with null value invisible

F

ftaghaboni

I am using a database result bot to publish data from a table. the table has
many fields and most of them are empty for most of the records (different
records have different fields occupied).

Is there any way to make the Null fields invisible? this will make the
results more user friendly.

Thanks,
 
K

Kathleen Anderson [MVP - FrontPage]

Wrap the field in a bit of script, like this:

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
web: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others
 
S

Stefan B Rusynko

FYI
checking for empty or null fields is not the same and may fail depending on the way you check

The below only check if the field is not equal to a space
(different than empty - no space at all, or a Null)
<% If fp_rs("Municipality") > " " then %>

A more reliable test for an empty field would be
<% If Len(fp_rs("Municipality"))>0 then %>

And if the user really has the DB set up to use Null as a default for empty fields
<% If NOT IsNull(fp_rs("Municipality")) AND Len(fp_rs("Municipality"))>0 then %>

--

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


| Wrap the field in a bit of script, like this:
|
| 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
| web: http://www.spiderwebwoman.com/resources/
| Please reply to the newsgroup for the benefit of others
|
|
| | >I am using a database result bot to publish data from a table. the table
| >has
| > many fields and most of them are empty for most of the records (different
| > records have different fields occupied).
| >
| > Is there any way to make the Null fields invisible? this will make the
| > results more user friendly.
| >
| > Thanks,
|
|
 
F

ftaghaboni

Thank you both for your replies,

I understand what you mean Stefan and I am having that problem, do you have
a solution for it?
 
S

Stefan B Rusynko

The solution is in my response above
- or post what your specific problem is

--

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


| Thank you both for your replies,
|
| I understand what you mean Stefan and I am having that problem, do you have
| a solution for it?
|
| "Stefan B Rusynko" wrote:
|
| > FYI
| > checking for empty or null fields is not the same and may fail depending on the way you check
| >
| > The below only check if the field is not equal to a space
| > (different than empty - no space at all, or a Null)
| > <% If fp_rs("Municipality") > " " then %>
| >
| > A more reliable test for an empty field would be
| > <% If Len(fp_rs("Municipality"))>0 then %>
| >
| > And if the user really has the DB set up to use Null as a default for empty fields
| > <% If NOT IsNull(fp_rs("Municipality")) AND Len(fp_rs("Municipality"))>0 then %>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > _____________________________________________
| >
| >
| > | Wrap the field in a bit of script, like this:
| > |
| > | 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­;<</font>Municipa­lity<font
| > | size="-1">&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
| > | web: http://www.spiderwebwoman.com/resources/
| > | Please reply to the newsgroup for the benefit of others
| > |
| > |
| > | | > | >I am using a database result bot to publish data from a table. the table
| > | >has
| > | > many fields and most of them are empty for most of the records (different
| > | > records have different fields occupied).
| > | >
| > | > Is there any way to make the Null fields invisible? this will make the
| > | > results more user friendly.
| > | >
| > | > Thanks,
| > |
| > |
| >
| >
| >
 
F

ftaghaboni

Thank you very much, I tried it and it works fine.

Regards,

Stefan B Rusynko said:
The solution is in my response above
- or post what your specific problem is

--

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


| Thank you both for your replies,
|
| I understand what you mean Stefan and I am having that problem, do you have
| a solution for it?
|
| "Stefan B Rusynko" wrote:
|
| > FYI
| > checking for empty or null fields is not the same and may fail depending on the way you check
| >
| > The below only check if the field is not equal to a space
| > (different than empty - no space at all, or a Null)
| > <% If fp_rs("Municipality") > " " then %>
| >
| > A more reliable test for an empty field would be
| > <% If Len(fp_rs("Municipality"))>0 then %>
| >
| > And if the user really has the DB set up to use Null as a default for empty fields
| > <% If NOT IsNull(fp_rs("Municipality")) AND Len(fp_rs("Municipality"))>0 then %>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > _____________________________________________
| >
| >
| > | Wrap the field in a bit of script, like this:
| > |
| > | 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­;<</font>Municipa­lity<font
| > | size="-1">&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
| > | web: http://www.spiderwebwoman.com/resources/
| > | Please reply to the newsgroup for the benefit of others
| > |
| > |
| > | | > | >I am using a database result bot to publish data from a table. the table
| > | >has
| > | > many fields and most of them are empty for most of the records (different
| > | > records have different fields occupied).
| > | >
| > | > Is there any way to make the Null fields invisible? this will make the
| > | > results more user friendly.
| > | >
| > | > Thanks,
| > |
| > |
| >
| >
| >
 

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

Top