> > null="#!isDefined('myVar') OR !ListLen('myVar')#"
>
> Thanks Carl, I haven't actually tried both together, I've tried them
> by themselves (as well as isNumeric and was unsuccessful 100% of the
> time. I'll give this one a try next time I find a spot it could be
> used and tested. Thank you!
I wanted to just reply back with another modification I did because I was still
getting an error when there was no value coming through, but most likely the
variable itself was defined.
<cfqueryparam value="#isDefined('myVar')?myVar:''#" null="#!isDefined('myVar')
OR !ListLen('myVar') OR !isNumeric('myVar')#" cfsqltype="cf_sql_integer" />
I simply added in the null field !isNumeric('myVar') which checks to see if
it's numeric or not. I thought isDefined would catch it, but again it's a
field that's accepting integers and so maybe it was passing a '' value which is
not accepted in a numeric field. Correct me if I'm wrong please. I'm still
experimenting.
So, for now this is what I'm using, though I haven't tested it on a list of
integers yet. We'll see.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336250
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm