Your problem is unecessary use of string values and the evaluate() function
call ...
Pass the actual query to your custom tag rather than the name of the query
instead of using the evaluate function at all, i.e:
Your custom tag currently looks like
<cf_mycustomtag query="myquery">
change it to this
<cf_mycustomtag query="#myquery#">
You include the pound signs here because you want to pass the query and not
the name of the query, and then reference #attributes.query# instead of
#variables.query# within the custom tag and there will be no need for the
<cfset variables.query = ...> line or the evaluate() function call when
referencing the query recordcount... This will be more efficient and
generally speaking better practice.
hth
Isaac
www.turnkey.to
954-776-0046
> I have a huge Sales Application 99.99% completed and
> after hours of attempts. I'm stumped on the last part!
> Please send any help/advice. Thanks.
> I'm trying to extract values from a query from within a
> Custom Tag. I can get a record count value, but not a
> needed date column/value. Argh! Here's what I have ...
> ***IN THE CUSTOM TAG**********
> SET THE VARIABLE FOR THE QUERY
> <cfset Variables.Query = "Caller." & Attributes.Query>
> THIS EXPERSSION PARSES CORRECTLY AND RETURNS THE RECORD
> COUNT OF THE QUERY THAT IS PASSED TO THE CUSTOM TAG
> #Evaluate(Variables.Query & ".recordcount")#
> NOW I NEED TO EVALUATE A COLUMN'S VALUE WITHIN THE QUERY
> USING DATEDIFF. I'M UNABLE TO PROCESS WITH THE
> srf_q1_date COLUMN NAME. WHEN I HARD CODE THE DATE,
> WITH A DATE/TIME STAMP VALUE, IT WORKS.
> DOESN'T WORK
> <cfoutput query="#Variables.Query#">
> <CFSET qdif = #datediff("q", srf_q1_date, now())#>
> </cfoutput>
> WORKS
> <CFSET qdif = #datediff("q", "2/15/2002 12:00:00 PM", now
> ())#>
> ***********END***CUSTOM***TAG*****
> ****CUSTOM***TAG***REFERENCE**SYNTAX****
> <cf_excel_2 Query="standard_market_ALL"
> Columns="srf_companyname|srf_approv_eng|srf_sales|srf_cou
> ntry|srf_contact|srf_email|srf_projname|srf_frn_pn|srf_to
> tal_qnty|srf_sell_price|srf_prob|srf_q1_qnty|srf_q2_qnty|
> srf_q3_qnty|srf_q4_qnty|srf_q5_qnty|srf_q6_qnty|srf_date_
> created|srf_date_approv|srfor_date_entered|srfor_date_upd
> ated" HeaderTitles="COMPANY NAME|MARKET SALES
> ENG|FORECAST SALES ENG|COUNTRY|CUSTOMER CONTACT|CUSTOMER
> EMAIL|PROJECT NAME|FORECASTED PN|TOTAL UNITS|SELL
> PRICE|PROBABILTY|AMT Q1 2002|AMT Q2 2002|AMT Q3 2002|AMT
> Q4 2002|AMT Q1 2003|AMT Q2 2003|DATE SAMPLE
> REQUESTED|DATE SAMPLE APPROVED|DATE WIN FORECASTED|DATE
> FORECAST UPDATED" FileName="Steve.xls"
> AlternateRowColor="silver" Title="Company Forecast Wins
> by Company" NoDataMessage="There was no data returned."
> Border="yes">
> ****CUSTOM***TAG***REFERENCE******
> THANKS
> D-
> __________________________________________________________
> ____________
> This list and all House of Fusion resources hosted by
> CFHosting.com. The place for dependable ColdFusion
> Hosting.
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> Archives:
> http://www.mail-archive.com/[email protected]/
> Unsubscribe:
> http://www.houseoffusion.com/index.cfm?sidebar=lists
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists