I think this fails now because your calling pages variables scope isn't
available to your CFC anymore.

Code this by passing the query into the function instead of passing the
query name into the function, like this:
<cffunction name="convertArrayOfIDsToList"
  access="public"
  returntype="any"
  hint="Blah blah blah">

  <cfargument name="rs" type="query" required="true">
  <cfargument name="columnName" type="string" required="true">

  <cfset variables.ArrayIDs = ArrayNew(1)>

  <cfloop query = "rs">
     <cfset variables.ArrayTemp = ArrayAppend(variables.ArrayIDs, 
"#Evaluate(arguments.columnName)#")>
  </cfloop>

  <cfset variables.ListIDs = ArrayToList(variables.ArrayIDs, ",")>

  <cfreturn variables.ListIDs>

</cffunction>

Invoking it as such...

<cfinvoke method="convertArrayOfIDsToList"
  component="#Application.Path#/components/utilities"
  returnvariable="variables.myListOfIDs">

  <cfinvokeargument name="rs" value=#variables.myQueryName#>
  <cfinvokeargument name="columnName" value="myColumnName">

</cfinvoke>

-----Original Message-----
From: D M [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 11, 2003 3:39 PM
To: [EMAIL PROTECTED]
Subject: [CFCDev] unexpected error after upgrading to 6.1 


Hello.

Prior to upgrading to 6.1 - I've been using the following Function without 
any issues...

<cffunction name="convertArrayOfIDsToList"
  access="public"
  returntype="any"
  hint="Blah blah blah">

  <cfargument name="queryName" type="string" required="true">
  <cfargument name="columnName" type="string" required="true">

  <cfset variables.ArrayIDs = ArrayNew(1)>

  <cfloop query = "#arguments.queryName#">
     <cfset variables.ArrayTemp = ArrayAppend(variables.ArrayIDs, 
"#Evaluate(arguments.columnName)#")>
  </cfloop>

  <cfset variables.ListIDs = ArrayToList(variables.ArrayIDs, ",")>

  <cfreturn variables.ListIDs>

</cffunction>

Invoking it as such...

<cfinvoke method="convertArrayOfIDsToList"
  component="#Application.Path#/components/utilities"
  returnvariable="variables.myListOfIDs">

  <cfinvokeargument name="queryName" value="variables.myQueryName">
  <cfinvokeargument name="columnName" value="myColumnName">

</cfinvoke>

However, after upgrading to 6.1 I get the following error:

>>Attribute validation error for tag cfloop.  The value of the attribute 
>>query, which is currently "variables.myQueryName", is invalid.

It's referring to the place where I dynamically output the name of the query

into the <cfloop> within my Function...

Pardon my ignorance here, but does anybody know what I'm missing, or 
misunderstanding, and what is it about 6.1 that makes this no longer work?

Thanks.

D

_________________________________________________________________
Fast, faster, fastest: Upgrade to Cable or DSL today!   
https://broadband.msn.com

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]


***
The information in this email is confidential and intended solely for the individual 
or entity to whom it is addressed. If you have received this email in error please 
notify the sender by return e-mail, delete this email, and refrain from any disclosure 
or action based on the information.
****


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to