If the value is a Query value two options you could possibly do
<CFOUTPUT QUERY="myQ">
<!--- Assign value to a new variable --->
<CFSET myNewVar = myQ.expr3>
<!--- Run validation for Null and 0 --->
<cfif len(expr3) EQ 0 OR expr3 EQ "">
<cfset myNewVar = 0>
<cfelse>
<cfste myNewVar = expr3>
</cfif>
Then use the new variable.
Now something I have not tried is since the Query is actually a
structure,
If you know the column and row, you can update the structure.
Someone on here mentioned that earlier but not had a chance to test it.
-----Original Message-----
From: Richard Colman [mailto:[EMAIL PROTECTED]
Sent: Friday, March 24, 2006 3:42 PM
To: CF-Talk
Subject: CFIF and null values
I have a null value being returned from a query. I would like to catch
it and give it a value before proceeding.
So, assuming that CF returns a null value as a null string, I tried the
following:
<cfif len(expr3) eq 0>
<CFSET expr3 = 0>
</cfif>
Also
<cfif expr3 = "">
<CFSET expr3 = 0>
</cfif>
However, neither of these are working.
Any suggestions appreciated.
Rick Colman
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236172
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54