I think what Jason said is true.  On any given page you can have many queries active 
so you can't have 1 variable with the query name.

Then only way I know of to make your tag dynamic is to pass your query name in as a 
parameter.  You can then try something like this:

<CFSET lcQueryName = "caller." & #attributes.queryname#>
<CFSET loQueryObject = EVALUATE("#lcQueryName#")>

<cfloop index = "i" list="#loQueryObject.columnlist#">
    <CFSET SetVariable("caller.attributes.#i#", evaluate("#i#"))>
</cfloop>

Hope that helps.

Bill Grover
Supervisor, IS
EU Services, Inc.
649 N Horners Ln
Rockville MD 20850

Phone:  301-424-3300 x396
FAX:    301-424-3300 x1396#
E-Mail: [EMAIL PROTECTED]
WWW:    www.euservices.com

------------------------------

Date: Thu, 10 Aug 2000 03:45:55 -0400
From: "Jason Aden" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: RE: Is there a variable for a query's name?
Message-ID: <[EMAIL PROTECTED]>

It's 3:40AM, but I think I understand what you want. I don't think CF
provides a way to do that. Even if there were a CGI variable for the query
name, it would have to be a list of query names for all queries run on that
request, and I don't think that would help you very much in making this
thing totally dynamic.


-----Original Message-----
From: Sean Renet [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 10, 2000 12:35 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Is there a variable for a query's name?


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.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to