query display label

  • Thread starter Thread starter mac
  • Start date Start date
M

mac

Can I change the label on a field dependent upon the
value that is in another field in the same query? I am
using fp2003 DRW to a SQL database using asp pages. The
first page is a dropdown list that sends a userid to the
second page which is then input to a query that displays
the components assigned to that user. The queries work
and display data but some fields use generic labels.

For example, the component field in the record can be
several values, ie.. phone, circuit, server. Additional
fields in the same record are labeled Attrib1, Attrib2,
etc.. and they contain values which describe attributes
of the component.

The data is;
Comp = phone / attrib1 = area code
Comp = Circuit / attrib1 = point-point
Comp = Server / attrib1 = cluster

So I want the label to reflect the data in the attrib
field;
If comp = phone, change the attrib1 label to Area Code
If comp = circuit, change the attrib1 label to point-point
etc...

The database layout may sound strange, but it is a
vendors database and I cannot modify it.
 
Yes you can, insert this before the Frontpage code that writes the value that you want to customize the label for

<%
Dim Labe
Dim Valu

NetType = (FP_FieldVal(fp_rs,"Comp_Type") )

Select Case NetTyp
Case "DIALUP": Label = "Users domain is
Case "CIRCUIT": Label = "Type of circuit is
Case "Router": Label = "Router Name is
End Selec

response.write Labe
%><!--webbot bot="DatabaseResultColumn" s-columnnames="Comp_Id,Comp_Type,C........ etc... "
 

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

Back
Top