loop question , seems to be invalid
Hi there ppl. i have a little problem with this... i have a query with name of companies ,selected names are columns of another query , and i need to list the values for that names.. Code Example cfloop query=selectCompanies cfif listlen(valuelist(evaluate(companyDetails.#Acronym#))) --- some code here --- /cfif /cfloop i think valuelist dont support Evaluate in there... The syntax is valid cause Coldfusion raise Just in time compilation error Any ideas?... ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:205247 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: loop question , seems to be invalid
Solved : You cant valuelist(evaluate(queryname.#dynamic#)) But you can Evaluate(valuelist(queryname.#dynamic#)) David Manriquez Desarrollador [EMAIL PROTECTED] (+56-2) 43 00 155 -Mensaje original- De: David Manriquez [mailto:[EMAIL PROTECTED] Enviado el: Lunes, 02 de Mayo de 2005 12:19 Para: CF-Talk Asunto: loop question , seems to be invalid Hi there ppl. i have a little problem with this... i have a query with name of companies ,selected names are columns of another query , and i need to list the values for that names.. Code Example cfloop query=selectCompanies cfif listlen(valuelist(evaluate(companyDetails.#Acronym#))) --- some code here --- /cfif /cfloop i think valuelist dont support Evaluate in there... The syntax is valid cause Coldfusion raise Just in time compilation error Any ideas?... ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:205252 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: loop question , seems to be invalid
Solved : You cant valuelist(evaluate(queryname.#dynamic#)) But you can Evaluate(valuelist(queryname.#dynamic#)) Yea, valuelist has always been a tad odd... like parameterexists()... I wonder that they've never changed it to allow quotes (valuelist(queryname.#column#)) or that they've never provided a valueArray() function, since it's pretty popular for people to want to treat query columns as arrays... I know we can listtoarray(valuelist(query.column)), except that's more work for the machine _and_ it removes duplicates... with CF5 using query[column] worked but with cfmx you have to use query[column].toArray() -- which obviously doesn't work on CF5, so that leaves us with no good single solution on both versions. I actually went to the extent of creating a QueryColumnToArray() function to handle the variation... don't mind me... just thinking abroad... s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:205256 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: loop question , seems to be invalid
*snip*treat query columns as arrays... I know we can listtoarray(valuelist(query.column)), except that's more work for the machine _and_ it removes duplicates... with CF5 using query[column] worked but with cfmx you have to use query[column].toArray() -- which obviously doesn't work on CF5, so that leaves us with no good single solution on both versions. I actually went to the extent of creating a QueryColumnToArray() function to handle the variation... Which reminds me... I recently had a debate with someone regarding whether a query recordset is a structure in the same sense as the Struct functions work. The other person said that the Struct is indexed and will always be more efficient, whereas the recordset is not. I thought that a recordset IS a structure. Is there really a difference between these 2 types of structures? ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:205270 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: loop question , seems to be invalid
And what about recordset being accessed like an array: ArrayToList(query['column']) ? Fabio Terracini Synex Technologies Co. Consultant Fone/Fax: +55 (11) 3071-3363 [EMAIL PROTECTED] www.synex.com.br Rebecca Wells wrote: *snip*treat query columns as arrays... I know we can listtoarray(valuelist(query.column)), except that's more work for the machine _and_ it removes duplicates... with CF5 using query[column] worked but with cfmx you have to use query[column].toArray() -- which obviously doesn't work on CF5, so that leaves us with no good single solution on both versions. I actually went to the extent of creating a QueryColumnToArray() function to handle the variation... Which reminds me... I recently had a debate with someone regarding whether a query recordset is a structure in the same sense as the Struct functions work. The other person said that the Struct is indexed and will always be more efficient, whereas the recordset is not. I thought that a recordset IS a structure. Is there really a difference between these 2 types of structures? ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:205271 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54