can i do this in cfstoredproc ```<cfif isDefine...
# cfml-general
s
can i do this in cfstoredproc
Copy code
<cfif isDefined('title')><cfprocparam type="IN" cfsqltype="VARCHAR" dbvarname="@title" value="#arguments.title#" null="#!len(arguments.title)#"><cfelse>null</cfif>
a
Well... did you try it? What happened? The computer is not going to bite you if you do something that doesn't work.
s
it does bit, but now i need to add something in the null attribute to check if isdefined, use it else put null
a
Right. So which part of that can you not work out?
b
Some remarks: 1. Do you mean in fact isDefined('arguments.title')? 2. #len(arguments.title) eq 0# says it perhaps more accurately. 3. The else-block and the 'null' within it seem superfluous.
s
i did added isdefined but as ternary in the null attribute itself
seems working