if your searching for length or lack there of I prefer to use the len() method along with trimming any trailing or preceeding whitespace
<cfif len(trim(arguments.asking1)> </cfiif> On 12/21/06, John Cox <[EMAIL PROTECTED]> wrote: > > On 12/21/06, Doug Brown <[EMAIL PROTECTED]> wrote: > > > > I am having some troubles with an if statement and cannot seem to get it > > right. I have 2 text fields that hold the value of the price of items a > user > > is selling, a user can fill in either one of the fields or none at all. > If > > the user chooses not to fill in these fields, then I want to add a > default > > value of 0 to the price in the database. > > > > > > I am using this so far with not luck. I tried using <CFELSEIF> with no > > luck either. In the below code, I will get two price objects due to one > or > > both fields being empty. > > > > <cfif arguments.asking1 IS NOT ""> > > price = #ARGUMENTS.asking1#, > > </cfif> > > > > I believe: > > <cfif arguments.asking1 neq ''> > > Will work. > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264850 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4