Answered
Cannot seem to check for blanks
My sql table has a field that I need to check to see if there
is something in there or not. If it is not blank, then I want to
display the value, if it is blank, then I want to dispaly None.
I usually just check for field is "", but for some reason, this time it is not working, the display comes out blank instead of None.
Here is the code I am using, with and "", but neihter of them work :
<tr>
<td align="right">Supplier Division: </td>
<cfif sn_detail.division_name is " ">
<td align="left">None</td>
<cfelse>
<td align="left">#division_name#</td>
</cfif>
</tr>
What am I doing wrong, or what other method/technique can I use ?
(I event tried the #len but that did not work,but maybe I did not do it righ)
I usually just check for field is "", but for some reason, this time it is not working, the display comes out blank instead of None.
Here is the code I am using, with and "", but neihter of them work :
<tr>
<td align="right">Supplier Division: </td>
<cfif sn_detail.division_name is " ">
<td align="left">None</td>
<cfelse>
<td align="left">#division_name#</td>
</cfif>
</tr>
What am I doing wrong, or what other method/technique can I use ?
(I event tried the #len but that did not work,but maybe I did not do it righ)
