So pass the name of the query as an argument to your Module, and use evaluate...

<CF_SeansTag QUERY="myquery">



At 09:35 PM 8/9/00 -0700, Sean Renet wrote:
>I must be the most unarticulate person on these lists.
>
>Okay here is the thing.  I want to tagify this piece of code.
>
><cfloop index = "i" list="#RETAILER_INFO.columnlist#">
><CFSET temp = SetVariable("attributes.#i#", evaluate("RETAILER_INFO.#i#"))>
></cfloop>
>
>so what I want to do is put the following in a tag...
>
><cfloop index = "i" list="#caller.somequeryname.columnlist#">
><CFSET SetVariable("caller.attributes.#i#", evaluate("somequeryname.#i#"))>
></cfloop>
>
>(where in this case, somequeryname would be a server or cgi variable for
>RETAILER_INFO, which is the name attribute of my cfquery)
>
>So that I don't have to hard code the query name into the tag.  I am looking
>for a server variable for the Name="..." in a CFQUERY.
>
>> Well, in order to process something like "MyQuery.QueryName", wouldn't you
>> already know that the query's name is "MyQuery"?
>
>No, I want to tagify it so I can use that code for every query I run.  It
>wouldn't make much sence to make a tag if I had to hard code the QueryName
>as a CFSET or attribute in the tag.
>
>----- Original Message -----
>From: "Norman Elton" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, August 09, 2000 7:27 PM
>Subject: RE: Is there a variable for a query's name?
>
>
>> I'm afraid I might not understand your question, but as I understand it,
>you
>> want to return the value specified as the Name="..." in a CFQUERY?
>>
>> Well, in order to process something like "MyQuery.QueryName", wouldn't you
>> already know that the query's name is "MyQuery"? The object's name is the
>> anchor for all the other attributes such as RecordCount and ColumnList,
>etc.
>> If you don't already know the name, it's awfully hard to refer to the
>> object.
>>
>> Hope this helps. If not, reply!
>>
>> Norman Elton
>> Information Technology
>> College of William & Mary
>>
>> -----Original Message-----
>> From: Sean Renet [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, August 09, 2000 8:36 PM
>> To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
>> [EMAIL PROTECTED]
>> Subject: Re: Is there a variable for a query's name?
>>
>>
>> No that's not what I meant.  What I meant was a cgi variable for the
>query's
>> name like myquery.columnlist gives you the query's column list and
>> myquery.recordcount gives you the query's record count.  I want a cgi
>> variable for the query's name like myquery.queryname
>> ----- Original Message -----
>> From: "Philip Arnold - ASP" <[EMAIL PROTECTED]>
>> To: <[EMAIL PROTECTED]>
>> Sent: Wednesday, August 09, 2000 3:14 AM
>> Subject: RE: Is there a variable for a query's name?
>>
>>
>> > > I am trying to make a tag that changes the scope of a query to the
>> > > attributes scope.
>> > >
>> > > I want to tagify...
>> > > <cfloop index = "i" list="#RETAILER_INFO.columnlist#">
>> > > <CFSET temp = SetVariable("attributes.#i#",
>> > > evaluate("RETAILER_INFO.#i#"))>
>> > > </cfloop>
>> > >
>> > > so what I want to do is...
>> > >
>> > > <cfloop index = "i" list="#caller.somequery.columnlist#">
>> > > <CFSET SetVariable("caller.attributes.#i#",
>evaluate("somequery.#i#"))>
>> > > </cfloop>
>> > >
>> > > Is there a variable for the query's name?  There has to be one,
>> debugging
>> > > lists the names of the queries...
>> >
>> > As this hasn't been answered for a couple of days (and I'm just catching
>> up
>> > on emails)...
>> >
>> > You can use a variable name and Evaluate;
>> > <cfloop index = "i" list="#Evaluate("#caller.somequery#.columnlist")#">
>> > <CFSET SetVariable("caller.attributes.#i#",
>> > evaluate("#caller.somequery#.#i#"))>
>> > </cfloop>
>> >
>> > I'm not sure about the multiple scoping on caller.attributes. but the
>> query
>> > name should work
>> >
>> > Philip Arnold
>> > ASP Multimedia Limited
>> > T: +44 (0)20 8680 1133
>> >
>> > "Websites for the real world"
>> >
>> > **********************************************************************
>> > This email and any files transmitted with it are confidential and
>> > intended solely for the use of the individual or entity to whom they
>> > are addressed. If you have received this email in error please notify
>> > the system manager.
>> > **********************************************************************
>> >
>> >
>>
>> --------------------------------------------------------------------------
>> ----
>> > Archives: http://www.mail-archive.com/[email protected]/
>> > To Unsubscribe visit
>> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>> the body.
>> >
>>
>> --------------------------------------------------------------------------
>--
>> --
>> Archives: http://www.mail-archive.com/[email protected]/
>> To Unsubscribe visit
>> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>> the body.
>>
>> --------------------------------------------------------------------------
>----
>> Archives: http://www.mail-archive.com/[email protected]/
>> To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>>
>
>------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body. 


---------------------------------------------------------------------------
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 Fax 1.212.679.8032

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to