Re: access dynamic structure value

2009-09-02 Thread Matthew Smith
Thanks for all the help guys. Learned a lot from the thread. Good stuff. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive:

access dynamic structure value

2009-09-01 Thread Matthew Smith
I am trying to do this, referencing the currentrecord structure: cfloop from=1 to=#currentrecord.NUM_CART_ITEMS# index=cartentry cfset currententry = currentrecord.ITEM_NAME#cartentry# #currententry#br /cfloop what is the syntax?

Re: access dynamic structure value

2009-09-01 Thread David McGuigan
#currentRecord[ item_name#cartEntry# ]# You don't even need to assign it to currentEntry. On Tue, Sep 1, 2009 at 6:15 PM, Matthew Smith chedders...@gmail.com wrote: I am trying to do this, referencing the currentrecord structure: cfloop from=1 to=#currentrecord.NUM_CART_ITEMS#

Re: access dynamic structure value

2009-09-01 Thread Jason Fisher
currentRecord is a property of a query, not a query itself and you don't need it to loop over a query = use the cfoutput syntax to loop over your query: cfoutput query=myQuery #item_name#br / /cfoutput ~| Want to reach the

Re: access dynamic structure value

2009-09-01 Thread John M Bliss
Or #currentRecord[item_name cartEntry]# On Tue, Sep 1, 2009 at 7:22 PM, David McGuigan davidmcgui...@gmail.comwrote: #currentRecord[ item_name#cartEntry# ]# You don't even need to assign it to currentEntry. On Tue, Sep 1, 2009 at 6:15 PM, Matthew Smith chedders...@gmail.com wrote:

Re: access dynamic structure value

2009-09-01 Thread John M Bliss
Oh, right. Or if he's just trying to address one row in a query result set, he'd need something like this for row 35: cfset thiscurrentrecord = 35 cfloop from=1 to=#myQuery.NUM_CART_ITEMS[thiscurrentrecord]# index=cartentry #myQuery.[ITEM_NAME cartentry][thiscurrentrecord]#br /cfloop ...and,

Re: access dynamic structure value

2009-09-01 Thread Azadi Saryev
it depends on what type of 'structure' it is: if your currentrecord.ITEM_NAME is an array, then get its individual elements as currentrecord.ITEM_NAME[cartentry] but if ITEM_NAME1, ITEM_NAME2, ..., ITEM_NAMEx are keys in your currentrecord structure, then do as others said:

Re: access dynamic structure value

2009-09-01 Thread James Holmes
You're correct - it's also just a number, not the whole row of a query, when looping with cfoutput or cfloop. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/9/2 Azadi Saryev az...@sabai-dee.com: On 02/09/2009 10:06, Jason Fisher wrote: currentRecord is

Re: access dynamic structure value

2009-09-01 Thread Azadi Saryev
On 02/09/2009 10:06, Jason Fisher wrote: currentRecord is a property of a query, not a query itself and you don't need it to loop over a query = use the cfoutput syntax to loop over your query: cfoutput query=myQuery #item_name#br / /cfoutput i thought the query's property was