Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFSelect Dropdownvalue Problem 1

Status
Not open for further replies.

yoshismokey

Programmer
Sep 17, 2005
25
0
0
US
Hi, I have a cfselect problem. When the following code is run, if there are any blanks in the fields, none of the values appear in the drop down box. Any ideas why?
Thanks,
Here's the code....


<cfquery name="getcust" datasource=#MM_connproducts_DSN# username=#MM_connproducts_USERNAME# password=#MM_connproducts_PASSWORD# debug="yes">
SELECT Customer_Number, Hospital_System_Name, Hospital_Name, Address1, City, State,
Customer_Number+' '+Hospital_System_Name+' '+Hospital_Name+' '+Address1+' '+City+' '+State+'' as dropdownvalue
FROM Customer
WHERE Customer.Agency_Name = '#Agency_Name#'
</cfquery>


<cfoutput><cfselect name="Selectbox" size="#getcust.recordcount#" message="You must select one customer number from the selection box."
query="getcust" value="dropdownvalue" required="yes" multiple="no">
</cfselect></cfoutput>


 
Are you sure the blanks aren't NULLs? NULL + anything else = NULL.

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
Eschewing obfuscation diurnally.
 
If they are NULL, why don't any of the other fields show up? They may very well be NULL.
Robin
 
If you concatenate a NULL value with anything else, the result is NULL. This is an ANSI behavior. You have to use whatever function your DB has to replace NULLs with actual blank values.

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
Eschewing obfuscation diurnally.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top