Solved it..
forced the values to be set like this
<cfif IsDefined("url.person_id")>
<cfset arguments.person_id = url.person_id>
<cfelse>
<cfset arguments.person_id = "">
</cfif>
<cfif IsDefined("url.list")>
<cfset arguments.list = url.list>
<cfelse>
<cfset arguments.list = "">
</cfif>
<cfif IsDefined("url.dept_no_search")>
<cfset arguments.dept_no_search = url.dept_no_search>
<cfelse>
<cfset arguments.dept_no_search = "">
</cfif>
Sometimes you just have to visualize it and then the answer comes..
Scott Stewart wrote:
> Sorry for the cryptic subject
>
> In a function I have three arguments.
>
> <cfargument name ="person_id"/>
> <cfargument name = "list"/>
> <cfargument name = "dept_no_search"/>
>
> at any given time only one will be populated, based on the existence of
> a url variable.
>
> and then
>
> <cfif structKeyExists(Arguments,"arguments.person_id") is "Yes">
> run queries based on person_id
> </cfif>
>
> <cfif structKeyExists(Arguments,"arguments.list") is "Yes">
> run queries based on list
> </cfif>
>
> etc...
>
> I know I could break the function up into separate functions, and the
> arguments have to be the first items in a function
> but is there a simple way to do this..
>
> <cfif IsDefined("url.person_id")>
> <cfargument name ="person_id"/>
> <cfelse>
> </cfif>
>
>
>
>
--
--
Scott Stewart
ColdFusion Developer
Office of Research Information Systems
Research & Economic Development
University of North Carolina at Chapel Hill
Phone:(919)843-2408
Fax: (919)962-3600
Email: [EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310916
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4