Sorry I left a comma in there, it should be... <cfif variables[ 'ConvertedFields_' & attributes.QueryName].RecordCount GT 0>
On Wed, May 28, 2014 at 5:07 PM, Jack Traynor <traynor.j...@gmail.com>wrote: > Hi Dan, > Try the following... > > <cfif variables[ 'ConvertedFields_' & attributes.QueryName'].RecordCount GT > 0> > > You were including the RecordCount attribute as a part of the variable > name (Inside the square brackets). > > Good luck, > > Jack Traynor > > > On Wed, May 28, 2014 at 8:12 AM, Dan LeGate <d...@legeek.com> wrote: > >> >> Thanks Matt! >> >> That worked for cfdump. >> >> Now I'm trying to cfif for the RecordCount and neither: >> >> <cfif variables[ 'ConvertedFields_' & attributes.QueryName.RecordCount' >> ] GT 0> >> >> nor >> >> <cfif variables[ 'ConvertedFields_' & attributes.QueryName & >> '.RecordCount' ] GT 0> >> >> works. Any advice on this one? >> >> Getting "Element QUERYNAMES.RECORDCOUNT is undefined in ATTRIBUTES. " >> and "Element ConvertedFields_GetLDAPInfo.RecordCount is undefined in a >> Java object of type class coldfusion.runtime.VariableScope referenced" >> respectively. >> >> Thanks again. >> >> Dan >> >> On 5/27/2014 1:55 PM, Matt Quackenbush wrote: >> > Try<cfdump var="#variables[ 'ConvertedFields_'& attributes.QueryName >> ]#"> >> > >> > >> > On Tue, May 27, 2014 at 4:49 PM, Dan LeGate<d...@legeek.com> wrote: >> > >> >> Hi all, >> >> >> >> I'm attempting to create a dynamic query name inside a Custom Tag. >> >> >> >> It seems to get created fine, but referencing it seems to be the >> problem. >> >> >> >> Here's where I set it up: >> >> >> >> <cfquery name="ConvertedFields_#attributes.QueryName#" dbtype="query"> >> >> >> >> So, yes, it's a Query of Query, if that makes a difference. >> >> >> >> But when I try to reference it later, like this: >> >> >> >> <cfdump var="ConvertedFields_#attributes.QueryName#"> >> >> >> >> or >> >> >> >> <cfdump var="#ConvertedFields_[attributes.QueryName]#"> >> >> >> >> or >> >> >> >> <cfdump var="#ConvertedFields_['#attributes.QueryName#']#"> >> >> >> >> It always errors out with "Variable CONVERTEDFIELDS_ is undefined." >> >> >> >> I know I'm missing something simple here. My brain is not recalling >> how >> >> to handle these. :-) >> >> >> >> Any help is appreciated. >> >> >> >> >> > >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358698 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm