cfset this.scriptProtect = No

2013-01-11 Thread Eric Bourland
Hi. I have a question about the wisdom of disabling the scriptProtect function in application.cfc. In my application.cfc, I have set cfset this.scriptProtect = No . like this: cfcomponent output=false cfset this.scriptProtect = No I did this to allow my client to paste the OBJECT

append with cfset

2012-12-27 Thread Chad Gray
I thought CF could appended data in a cfset tag like: cfset foo = boo cfset foo =+ moo So if you output foo you would get boomoo. Or am I thinking of another language? ~| Order the Adobe Coldfusion Anthology now

RE: append with cfset

2012-12-27 Thread DURETTE, STEVEN J
I believe that should be += and I think that started working in CF9. -Original Message- From: Chad Gray [mailto:cg...@careyweb.com] Sent: Thursday, December 27, 2012 2:04 PM To: cf-talk Subject: append with cfset I thought CF could appended data in a cfset tag like: cfset foo

RE: append with cfset

2012-12-27 Thread Chad Gray
I do it that way and it tries to use addition (math) not append. -Original Message- From: DURETTE, STEVEN J [mailto:sd1...@att.com] Sent: Thursday, December 27, 2012 2:05 PM To: cf-talk Subject: RE: append with cfset I believe that should be += and I think that started working in CF9

RE: append with cfset

2012-12-27 Thread DURETTE, STEVEN J
Oh, good point... try = that is a guess so I don't guarantee it. -Original Message- From: Chad Gray [mailto:cg...@careyweb.com] Sent: Thursday, December 27, 2012 2:10 PM To: cf-talk Subject: RE: append with cfset I do it that way and it tries to use addition (math) not append

RE: append with cfset

2012-12-27 Thread Chad Gray
AH! Good guess. That worked. Thanks! -Original Message- From: DURETTE, STEVEN J [mailto:sd1...@att.com] Sent: Thursday, December 27, 2012 2:11 PM To: cf-talk Subject: RE: append with cfset Oh, good point... try = that is a guess so I don't guarantee it. -Original Message

RE: append with cfset

2012-12-27 Thread DURETTE, STEVEN J
Any time! :) -Original Message- From: Chad Gray [mailto:cg...@careyweb.com] Sent: Thursday, December 27, 2012 2:18 PM To: cf-talk Subject: RE: append with cfset AH! Good guess. That worked. Thanks! ~| Order

How to set cfset session variable to be called in a cfc?

2011-01-07 Thread Faye Larson
With the following code from two cfc files, how do I pass the result from getAllAsStruct in CustomerGateway.cfc to exportToExcel, #arguments.data#, in Export.cfc? My environment is set up for using session variables. I need to cfset session.exportData somewhere so that it can be called? How

Re: How to set cfset session variable to be called in a cfc?

2011-01-07 Thread Tom McNeer
. I need to cfset session.exportData somewhere so that it can be called? Obviously, I don't know exactly what you're trying to do, but here's a pretty good guess: the real point is to export some customer data as an Excel file. So you probably want another CFC (call it a service component

Re: How to set cfset session variable to be called in a cfc?

2011-01-07 Thread Faye Larson
I am trying to export the data which is an arrayCollection in Flex to Excel. I followed this article, http://viconflex.blogspot.com/2007/02/export-data-from-flex-app-using.html, and got all the components working. Now the last step is to make the data (arrayCollection) available in

Re: How to set cfset session variable to be called in a cfc?

2011-01-07 Thread Tom McNeer
Faye, On Fri, Jan 7, 2011 at 1:54 PM, Faye Larson fz...@yahoo.com wrote: I am trying to export the data which is an arrayCollection in Flex to Excel. I followed this article, http://viconflex.blogspot.com/2007/02/export-data-from-flex-app-using.html, and got all the components working. Now

Re: How to set cfset session variable to be called in a cfc?

2011-01-07 Thread Faye Larson
Faye, I am trying to export the data which is an arrayCollection in Flex to Excel. I followed this article, http://viconflex.blogspot.com/2007/02/export-data-from-flex-app-using.html, and got all the components working. Now the last step is to make the data (arrayCollection) available in

Re: How to set cfset session variable to be called in a cfc?

2011-01-07 Thread Faye Larson
=100%/ /mx:Panel /mx:Canvas CustomerGateway.cfc cfcomponent output=false !--- Populating an array from a query, an array of CFML structures --- cffunction name=getAllAsStruct output=false access=remote returntype=array cfset var qRead

Re: How to set cfset session variable to be called in a cfc?

2011-01-07 Thread Tom McNeer
Faye, The way you're handling the export has a number of issues. If you don't mind, I'll suggest a somewhat different flow to the logic. I definitely would not use the session scope here. It's just not necessary. But first - have you actually tested your .cfm file by placing some data into the

getting cfx_imsmail and cfset to play nice?

2009-05-12 Thread Jack Ring
to automatically loop the same query. My problem is that while inside an attribute of the cfx_imsmail tag, my cfset tags seem to be ignored. I want to put in place some link tracking logic and also a cfinclude tag that calls a dynamic template name. I have tried to set up this data

Re: getting cfx_imsmail and cfset to play nice?

2009-05-12 Thread Jack Ring
and queryfield attributes to automatically loop the same query. My problem is that while inside an attribute of the cfx_imsmail tag, my cfset tags seem to be ignored. I want to put in place some link tracking logic and also a cfinclude tag that calls a dynamic template name. I have tried to set

RE: using dynamic variable in cfset statement

2008-09-10 Thread Adrian Lynch
more-serious-face I didn't! /more-serious-face :OD -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] serious face there's probably not one of us on this list that didn't used to use evaluate() before being taught to look at other alternatives (and i'm sure some

Re: using dynamic variable in cfset statement

2008-09-10 Thread Raymond Camden
As someone who used to always pounce on folks for using evaluate, I believe I remember reading recently a blog entry from an Adobian that points out that evaluate is not nearly as slow as it used to be. Now when I recommend against Evaluate I do so on readability terms rather than performance.

RE: using dynamic variable in cfset statement

2008-09-10 Thread Adrian Lynch
Good thing my names Adrian then! :O. -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: 10 September 2008 14:33 To: CF-Talk Subject: Re: using dynamic variable in cfset statement As someone who used to always pounce on folks for using evaluate, I believe I remember

RE: using dynamic variable in cfset statement

2008-09-10 Thread David Moore, Jr.
I hope no one Evaluates() this thread or I'll get a CF- ;).~David _ Get more out of the Web. Learn 10 hidden secrets of Windows Live.

RE: using dynamic variable in cfset statement

2008-09-10 Thread Mark Kruger
Ray, As I recall no evaluate( ) used to be engraved on your family crest. How times have changed :) -mark -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 10, 2008 8:33 AM To: CF-Talk Subject: Re: using dynamic variable in cfset statement

Re: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread David Moore, Jr.
Ray wrote: As someone who used to always pounce on folks for using evaluate, I believe I remember reading recently a blog entry from an Adobian that points out that evaluate is not nearly as slow as it used to be. Now when I recommend against Evaluate I do so on readability terms rather

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Adrian Lynch
? If you don't mind tightening things up a bit, check FORM.Field is one of the available columns. Adrian -Original Message- From: David Moore, Jr. [mailto:[EMAIL PROTECTED] Sent: 10 September 2008 15:04 To: CF-Talk Subject: Re: How NOT to Evaluate (moved from cfset so not to confuse topic) Ray

Re: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread James Holmes
So FORM[FORM.FIELD] didn't work instead of Evaluate(FORM.#FORM.Field#)? On Wed, Sep 10, 2008 at 11:03 PM, David Moore, Jr. wrote: How then would you approach the following without Evaluate, because it was the only way I could get it to work: (oh, let the fun begin, the shame. I probably

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Mark Kruger
You need to make sure form.field contains a valid column and kill the query if it doesn't. Your use of evaluate is not the worst thing about this sample query (ha). Try this.. cfset colList = col1,col2,col3/ cfquery name=getPhysicianRecords datasource=#DSN# SELECT * FROM

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread David Moore, Jr.
Adrian Wrote: SELECT * FROM Contacts WHERE Contacts.ContactType = 'Physician' AND Contacts.#FORM.Field# = '#FORM[FORM.Field]#' ORDER BY Contacts.LastName What is the [] for. How would they be used. I have never used them at all. What is the protocal. Is that CF or SQL or... And then throw

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Adrian Lynch
NOT to Evaluate (moved from cfset so not to confuse topic) Adrian Wrote: SELECT * FROM Contacts WHERE Contacts.ContactType = 'Physician' AND Contacts.#FORM.Field# = '#FORM[FORM.Field]#' ORDER BY Contacts.LastName What is the [] for. How would they be used. I have never used them at all. What

Re: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Ian Skinner
David Moore, Jr. wrote: What is the [] for. How would they be used. That is called 'Array Notation'. All ColdFusion variables are now structures AKA 'Associative Array' or 'Hash' or many other names. But it means that you can dynamically reference the elements of complex variables by using

Re: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Gerald Guido
While we are on the subject. I know I have asked this before But I still haven't figured out a way to do this. I have a bunch of CFC's loaded in memory that I want to call based on the The table name. Is there a way to avoid using evaluate in cases like this: cfset MyServiceObj = evaluate

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Mark Kruger
David, Everything in CF (starting with CFMX and partially before that) is an object that has a parent. For example, if I do the following: cfset x = 10/ I have created a member of the variables scope (variables is the object and x is the member). So I could do the following with x

Re: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Ian Skinner
Gerald Guido wrote: cfset MyServiceObj = evaluate(Application.#arguments.MyTable#Service)/ cfset mystring = MyServiceObj.save#arguments.MyTable#(myBeanObj) / cfreturn evaluate(mystring) / Many TIA Well I think the first line could be... cfset MyServiceObe = Application[arguments.MyTable

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Adrian Lynch
A little correction: cfoutput#variables[x]#/cfoutput should be: cfoutput#variables[x]#/cfoutput Adrian -Original Message- From: Mark Kruger [mailto:[EMAIL PROTECTED] Sent: 10 September 2008 16:19 To: CF-Talk Subject: RE: How NOT to Evaluate (moved from cfset so not to confuse topic

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Adrian Lynch
Try... cfset myService = APPLICATION[ARGUMENTS.myTable Service] This would be nice: cfset myService[save ARGUMENTS.myTable](myBeanObj) But instead you have to do: cfinvoke component=#myService# method=save#ARGUMENTS.myTable# returnvariable=aVarIfYouWantOne cfinvokeargument name

Re: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Ian Skinner
Adrian Lynch wrote: A little correction: cfoutput#variables[x]#/cfoutput should be: cfoutput#variables[x]#/cfoutput Adrian OR cfset x = x cfoutput#variable[x]#/cfoutput :) But yea, what does that really gain for you

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Adrian Lynch
Oh and you might also try this: cfset theMethodIWantToRun = myService[save#ARGUMENTS.myTable#] cfset theMethodIWantToRun(myBeanObj) I have a feeling this doesn't work as I remember doing something like this in the past and then went back to using cfinvoke. Adrian -Original Message

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Mark Kruger
from cfset so not to confuse topic) A little correction: cfoutput#variables[x]#/cfoutput should be: cfoutput#variables[x]#/cfoutput Adrian -Original Message- From: Mark Kruger [mailto:[EMAIL PROTECTED] Sent: 10 September 2008 16:19 To: CF-Talk Subject: RE: How NOT to Evaluate (moved

Re: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Gerald Guido
Thanx Adrian and Ian. That worked. First try even..That was the secret handshake I was looking for. ~G~ On Wed, Sep 10, 2008 at 11:25 AM, Ian Skinner [EMAIL PROTECTED] wrote: Gerald Guido wrote: cfset MyServiceObj = evaluate(Application.#arguments.MyTable#Service)/ cfset mystring

Re: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Raymond Camden
throwing this out in case you see it. To get around it, I used a temp val. cfset rayrocksthefreeworld = form[key] cfqueryparam value=#rayrocksthefreeworld# On Wed, Sep 10, 2008 at 10:47 AM, Mark Kruger [EMAIL PROTECTED] wrote: Right... And doh! Mark A. Kruger, CFG, MCSE (402) 408-3733

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread David Moore, Jr.
You people are just scary smart. At least I have my good looks to fall back on :) (I wish)... ~David _ See how Windows connects the people, information, and fun that are part of your life.

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Eric Roberts
:[EMAIL PROTECTED] /*Sent: Wednesday, September 10, 2008 10:19 AM /*To: CF-Talk /*Subject: RE: How NOT to Evaluate (moved from cfset so not to confuse /*topic) /* /*David, /* /*Everything in CF (starting with CFMX and partially before that) is an /*object that has a parent. /* /* /*For example, if I

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Dave Francis
lol Shouldn't that be: cfset x = x cfoutput#variable[variable.x]#/cfoutput /lol -Original Message- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 10, 2008 11:37 AM To: CF-Talk Subject: Re: How NOT to Evaluate (moved from cfset so

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread David Moore, Jr.
days ago called cf_search_nextprevious: a href=#variables.FileName#?#variables.ExtraURLString#amp;#variables.strt_string#=#Evaluate(variables.strt + variables.show)##variables.layout_next#/a ~David lol Shouldn't that be: cfset x = x cfoutput#variable[variable.x]#/cfoutput /lol Adrian Lynch

Re: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Gerald Guido
Ok... Thanx All. Now this one is kicking my butt. cfset mystring = MyServiceObj.delete#arguments.MyTable#(#arguments.MyPK# = myBeanObj.get#arguments.MyPK#()) / cfreturn evaluate(mystring) / Using tblUsers it would render this cfset MyServiceObj.deleteTableUsers (UserID

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Adrian Lynch
If it's the arguments that's causing trouble, try this: [Do the cfinvoke thing here to get the user ID] cfset args = StructNew() cfset args[arguments.MyPK] = userID Then pass that structure into the method: cfset MyServiceObj.deleteTableUsers(argumentCollection = args) Adrian -Original

Re: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Raymond Camden
What's wrong with cfinvoke? Any reason you don't want to use that? On Wed, Sep 10, 2008 at 11:29 AM, Gerald Guido [EMAIL PROTECTED] wrote: Ok... Thanx All. Now this one is kicking my butt. cfset mystring = MyServiceObj.delete#arguments.MyTable#(#arguments.MyPK# = myBeanObj.get#arguments.MyPK

Re: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Gerald Guido
is kicking my butt. cfset mystring = MyServiceObj.delete#arguments.MyTable#(#arguments.MyPK# = myBeanObj.get#arguments.MyPK#()) / cfreturn evaluate(mystring) / Using tblUsers it would render this cfset MyServiceObj.deleteTableUsers (UserID = myBeanObj.getUserID

Re: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Judah McAuley
Untested but should work: cfquery name=getPhysicianRecords datasource=#DSN# SELECT * FROM Contacts WHERE Contacts.ContactType = 'Physician' cfif Len(form.field) AND StructKeyExists(form,form.field) AND Contacts.#FORM.Field# = '#Trim(form[form.field])#' cfelse 1 = 0 /cfelse ORDER BY

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread David Moore, Jr.
Judah wrote: Untested but should work: cfquery name=getPhysicianRecords datasource=#DSN# SELECT * FROM Contacts WHERE Contacts.ContactType = 'Physician' cfif Len(form.field) AND StructKeyExists(form,form.field) AND Contacts.#FORM.Field# = '#Trim(form[form.field])#' cfelse 1 = 0 /cfelse ORDER

Re: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread s. isaac dealey
cfinvoke component=#myService# method=save#ARGUMENTS.myTable# returnvariable=aVarIfYouWantOne cfinvokeargument name=myBeanObj value=#myBeanObj# /cfinvoke I found on one of Ben Nadel's blog recently that you can (at least with CF8 and the latest updater) use 1 as the name of the argument.

Re: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread s. isaac dealey
Showing my ignorance again, but it is already showing so why not. What does the 1 = 0 do? Evaluates to false and returns no records in the query. -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 781.769.0723 http://onTap.riaforge.org/blog

Re: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Judah McAuley
Ah, sorry, didn't explain fully. I did a StructKeyExists and a Len to make sure that the field you are going to evaluate really exists in the form. If it doesn't, you don't want your cfquery to throw a gnarly error (most likely) so if the assertion is false, the WHERE clause becomes WHERE 1 = 0

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread David Moore, Jr.
Now I am having one of those v8Aha!/v8 moments. Thank you... ~David Judah wrote: Ah, sorry, didn't explain fully. I did a StructKeyExists and a Len to make sure that the field you are going to evaluate really exists in the form. If it doesn't, you don't want your cfquery to throw a

Re: using dynamic variable in cfset statement

2008-09-10 Thread Brad Wood
, September 10, 2008 8:33 AM Subject: Re: using dynamic variable in cfset statement As someone who used to always pounce on folks for using evaluate, I believe I remember reading recently a blog entry from an Adobian that points out that evaluate is not nearly as slow as it used to be. Now when I

Re: using dynamic variable in cfset statement

2008-09-10 Thread Judah McAuley
witch-hunt mentality is a little obtuse. :) ~Brad - Original Message - From: Raymond Camden [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Wednesday, September 10, 2008 8:33 AM Subject: Re: using dynamic variable in cfset statement As someone who used to always

RE: How NOT to Evaluate (moved from cfset so not to confuse topic)

2008-09-10 Thread Mark Kruger
: Eric Roberts [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 10, 2008 11:19 AM To: CF-Talk Subject: RE: How NOT to Evaluate (moved from cfset so not to confuse topic) There is an order of precedence (which I don't remember offhand) that CF looks at when a variable isn't scoped. It goes down

using dynamic variable in cfset statement

2008-09-09 Thread Wally Randall
Why does this fail inside a cfoutput loop over a query: cfset application.#appconfig.code_name# = '#appconfig.code_value#' It generates this message: A CFML variable name cannot end with a . character. The variable application. ends with a . character. You must supply an additional structure

Re: using dynamic variable in cfset statement

2008-09-09 Thread Charlie Griefer
try cfset application[appconfig.code_name] = appconfig.code_value / On Tue, Sep 9, 2008 at 1:53 PM, Wally Randall [EMAIL PROTECTED]wrote: Why does this fail inside a cfoutput loop over a query: cfset application.#appconfig.code_name# = '#appconfig.code_value#' It generates this message

Re: using dynamic variable in cfset statement

2008-09-09 Thread Claude Schneegans
The variable application. ends with a . character. This looks to me like appconfig.code_name is an empty string. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial

Re: using dynamic variable in cfset statement

2008-09-09 Thread Justin Scott
Why does this fail inside a cfoutput loop over a query: cfset application.#appconfig.code_name# = '#appconfig.code_value#' It sounds like one of your code_name values is blank or null, resulting in an invalid variable name. -- Justin Scott, http://www.tlson.com

Re: using dynamic variable in cfset statement

2008-09-09 Thread Patrick Santora
Charlie has the idea. It's because you are referring to a variable contained within an structure and doing dynamic dot notation has it's issues and will not work in this case. -Pat On Tue, Sep 9, 2008 at 1:57 PM, Charlie Griefer [EMAIL PROTECTED]wrote: try cfset application[appconfig.code_name

Re: using dynamic variable in cfset statement

2008-09-09 Thread Wally Randall
The variable application. ends with a . character. This looks to me like appconfig.code_name is an empty string. It is not an empty string. Also, the [] is an invalid constrict in coldfusion. ~| Adobe® ColdFusion® 8

RE: using dynamic variable in cfset statement

2008-09-09 Thread Dave Watts
Why does this fail inside a cfoutput loop over a query: cfset application.#appconfig.code_name# = '#appconfig.code_value#' It has nothing to do with the query. To set a variable whose name isn't known until runtime, you have three options: 1. The syntax in Charlie's email - my preference out

Re: using dynamic variable in cfset statement

2008-09-09 Thread Charlie Griefer
On Tue, Sep 9, 2008 at 2:01 PM, Wally Randall [EMAIL PROTECTED]wrote: Also, the [] is an invalid constrict in coldfusion. could you elaborate on that please? -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.

RE: using dynamic variable in cfset statement

2008-09-09 Thread Dave Watts
Also, the [] is an invalid constrict in coldfusion. That hasn't been true since CF 4. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore,

Re: using dynamic variable in cfset statement

2008-09-09 Thread Patrick Santora
So are you saying: cfset application[appconfig.code_name] = '#appconfig.code_value#' or even cfset application.#appconfig.code_name# = '#appconfig.code_value#' does not work? The second example with quotes around the set variable should also work I believe. -Pat On Tue, Sep 9, 2008 at 2:01 PM

Re: using dynamic variable in cfset statement

2008-09-09 Thread Phillip Vector
Not in this case. The []'s will work. On 9/9/08, Wally Randall [EMAIL PROTECTED] wrote: The variable application. ends with a . character. This looks to me like appconfig.code_name is an empty string. It is not an empty string. Also, the [] is an invalid constrict in coldfusion.

Re: using dynamic variable in cfset statement

2008-09-09 Thread Ian Skinner
Wally Randall wrote: Why does this fail inside a cfoutput loop over a query: application. is an illegal variable name. To do this type of thing you need to use array notation. cfset application[appconfig.code_name] = appconfig.code_value

RE: using dynamic variable in cfset statement

2008-09-09 Thread David Moore, Jr.
Would something like this work? cfset Evaluate(application.#appconfig.code_name#) = '#appconfig.code_value#' ~ David Moore _ Get more out of the Web. Learn 10 hidden secrets of Windows Live. http://windowslive.com/connect/post

Re: using dynamic variable in cfset statement

2008-09-09 Thread Patrick Santora
Ouch! Evaluate On Tue, Sep 9, 2008 at 2:15 PM, David Moore, Jr. [EMAIL PROTECTED]wrote: Would something like this work? cfset Evaluate(application.#appconfig.code_name#) = '#appconfig.code_value#' ~ David Moore _ Get more

Re: using dynamic variable in cfset statement

2008-09-09 Thread Claude Schneegans
Also, the [] is an invalid constrict in coldfusion. well, if appconfig.code_name is an empty string, then [appconfig.code_name] will be equivalent to [], which is an invalid constrict in coldfusion. If I were you, I'll really make sure appconfig.code_name is not an empty string ;-) Just try

Re: using dynamic variable in cfset statement

2008-09-09 Thread Charlie Griefer
hehe :) On Tue, Sep 9, 2008 at 2:18 PM, Patrick Santora [EMAIL PROTECTED] wrote: Ouch! Evaluate On Tue, Sep 9, 2008 at 2:15 PM, David Moore, Jr. [EMAIL PROTECTED] wrote: Would something like this work? cfset Evaluate(application.#appconfig.code_name#) = '#appconfig.code_value

RE: using dynamic variable in cfset statement

2008-09-09 Thread David Moore, Jr.
I just love giving you guys something to laugh at ... Rag the newbie... It's OK. At least I am learning, and trying. :) hehe :) Ouch! Evaluate _ See how Windows Mobile brings your life together—at home, work, or on the go.

Re: using dynamic variable in cfset statement

2008-09-09 Thread Patrick Santora
It's sometimes the best and fastest way to learn :-). Evaluate works, it's just not really recommended Ouch. ;-) On Tue, Sep 9, 2008 at 2:27 PM, David Moore, Jr. [EMAIL PROTECTED]wrote: I just love giving you guys something to laugh at ... Rag the newbie... It's OK. At least I am learning,

Re: using dynamic variable in cfset statement

2008-09-09 Thread Casey Dougall
On Tue, Sep 9, 2008 at 4:53 PM, Wally Randall [EMAIL PROTECTED]wrote: Why does this fail inside a cfoutput loop over a query: cfset application.#appconfig.code_name# = '#appconfig.code_value#' It generates this message: A CFML variable name cannot end with a . character. The variable

Re: using dynamic variable in cfset statement

2008-09-09 Thread Charlie Griefer
hey i was laughing at patrick laughing at you, not laughing at you directly, so it's ok :) serious face there's probably not one of us on this list that didn't used to use evaluate() before being taught to look at other alternatives (and i'm sure some who still do use it). it's all good.

Re: using dynamic variable in cfset statement

2008-09-09 Thread Patrick Santora
laughingIt's kind of like a right of passage/laughing It just looks to tempting to use sometimes :-) Well said Charlie. On Tue, Sep 9, 2008 at 2:33 PM, Charlie Griefer [EMAIL PROTECTED]wrote: hey i was laughing at patrick laughing at you, not laughing at you directly, so it's ok :)

RE: using dynamic variable in cfset statement

2008-09-09 Thread David Moore, Jr.
Pat wrote: It's sometimes the best and fastest way to learn :-). Evaluate works, it's just not really recommended Ouch. ;-) Yes. It's just painful to the character of ones soul. I didn't know that about Evaluate. Glad I do know that...now. I wish there was an asterisks next to code

Re: using dynamic variable in cfset statement

2008-09-09 Thread Ian Skinner
Casey Dougall wrote: cfloop index=ColumnName list=#appconfig.ColumnList# cfset APPLICATION.appconfig.#ColumnName# = appconfig[#ColumnName#] /cfloop Or the same thing with a few less pound signs and quotes. cfset Application['appconfig'][ColumnName] = appconfig[ColunName] Or to completely

RE: using dynamic variable in cfset statement

2008-09-09 Thread David Moore, Jr.
Charlie wrote: hey i was laughing at patrick laughing at you, not laughing at you directly, so it's ok :) Oh, I'm cool. I worked in Radio for 15 years as a DJ, so I don't expect a whole lot out of myself. I thought it was funny too. :) ~David

RE: using dynamic variable in cfset statement

2008-09-09 Thread Bobby Hartsfield
: using dynamic variable in cfset statement laughingIt's kind of like a right of passage/laughing It just looks to tempting to use sometimes :-) Well said Charlie. On Tue, Sep 9, 2008 at 2:33 PM, Charlie Griefer [EMAIL PROTECTED]wrote: hey i was laughing at patrick laughing at you, not laughing

Conditional CFSET based on data in array

2008-09-08 Thread Jeff F
I've got a simple cart that stores items in an array. I keep a running total of the items in the cart looping through: cfloop collection=#session.cart# item=i cfset numberofitems = numberofitems + session.cart[i][4] /cfloop 4 is quantity of that item in the array. What I'd need

Re: Conditional CFSET based on data in array

2008-09-08 Thread Charlie Griefer
On Mon, Sep 8, 2008 at 12:54 PM, Jeff F [EMAIL PROTECTED] wrote: I've got a simple cart that stores items in an array. I keep a running total of the items in the cart looping through: cfloop collection=#session.cart# item=i cfset numberofitems = numberofitems + session.cart[i][4

Re: Conditional CFSET based on data in array

2008-09-08 Thread Jeff F
This seems to work: cfloop collection=#session.cart# item=i cfif session.cart[i][8] is not 22 cfset numberofitems = numberofitems + session.cart[i][4] /cfif /cfloop -Jeff I've got a simple cart that stores items in an array. I keep

Re: Conditional CFSET based on data in array

2008-09-08 Thread Brian Kotek
keep a running total of the items in the cart looping through: cfloop collection=#session.cart# item=i cfset numberofitems = numberofitems + session.cart[i][4] /cfloop 4 is quantity of that item in the array. What I'd need is to have a running total of items, that does not include a certain

Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Larry Lyons
I had originally posted this on CF-Community, but I thought that these results were interesting enough that others would like to see them. I got into a discussion at my new job about creating variables by the cfset tag or via a variable assignment using cfscript. The consensus has been

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Stephane Vantroyen
You should read this, quite interesting (CF8 vs CF7 etc) : http://neilmiddleton.com/2007/07/01/cf-8-and-performance-comparisons/ Regards, Stephane ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Dominic Watson
I ran your code a few times on my machine (XP Pro) and got varying results; sometimes the cfscript was faster, sometimes cfset. Try this code out instead, it performs a single test on both cfscript and cfset for each iteration and records a tally of the time taken for each - this spreads the test

RE: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Dave Watts
I had originally posted this on CF-Community, but I thought that these results were interesting enough that others would like to see them. I got into a discussion at my new job about creating variables by the cfset tag or via a variable assignment using cfscript. I really hate

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Claude Schneegans
Note that 1º according to the docs, GetTickCount() returns a string representation of the system time, not the time spent on the CF code. The CF server is running in a time shared environment, so the system time is not really representative of the execution time. 2º There is a huge difference

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Pete Jordan
Stephane Vantroyen wrote: You should read this, quite interesting (CF8 vs CF7 etc) : http://neilmiddleton.com/2007/07/01/cf-8-and-performance-comparisons/ My guess is that a lot (most?) of the runtime difference between CF7 and 8 is down to the JVM; Java 6 is faster than 5 and a *lot* faster

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Larry Lyons
I had originally posted this on CF-Community, but I thought that these results were interesting enough that others would like to see them. I got into a discussion at my new job about creating variables by the cfset tag or via a variable assignment using cfscript. I really hate

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Larry Lyons
thanks dominic, I ran your code and the results between setting variable blocks with cfscript or using cfset varied from trial to trial. Some times cfscript was faster, other times cfset. Anyhow in a nutshell it confirms my initial idea, that it isn't really a major issue. In the end

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Dominic Watson
with cfscript or using cfset varied from trial to trial. Some times cfscript was faster, other times cfset. Anyhow in a nutshell it confirms my initial idea, that it isn't really a major issue. In the end it depends on personal style, readability and other user factors as to which

Re: Interesting results with setting variables - cfset vs. using a cfscript block

2008-07-02 Thread Bryan Stevenson
 btw the answer is 42. Nopethat's the answer to life, the universe, and everything ;-) - Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web:

Problem using cfset inside cffunction

2007-05-14 Thread John P
I am attempting to use cffunction to query a database and then cfset the returned variables to a new names. I get the following error when attempting to access the page. Local variable givenname on line 19 must be grouped at the top of the function body. Here's my function that appears

Re: Problem using cfset inside cffunction

2007-05-14 Thread Charlie Griefer
you have to place your var scoped variables at the top of the function. in this case, you'd do something like: cfset var givenname = / cfset var sn = / cfset var mail = / (etc) above your cfldap call. On 5/14/07, John P [EMAIL PROTECTED] wrote: I am attempting to use cffunction to query

Re: Problem using cfset inside cffunction

2007-05-14 Thread John P
Great, thanks Charlie. you have to place your var scoped variables at the top of the function. in this case, you'd do something like: cfset var givenname = / cfset var sn = / cfset var mail = / (etc) above your cfldap call. On 5/14/07, John P [EMAIL PROTECTED] wrote

Re: Problem using cfset inside cffunction

2007-05-14 Thread Andrew Scott
It would be nice that you could var them anywhere in the function, oh well. On 5/15/07, John P [EMAIL PROTECTED] wrote: Great, thanks Charlie. you have to place your var scoped variables at the top of the function. in this case, you'd do something like: cfset var givenname

Re: Problem using cfset inside cffunction

2007-05-14 Thread Gert Franz
, you'd do something like: cfset var givenname = / cfset var sn = / cfset var mail = / (etc) above your cfldap call. On 5/14/07, John P [EMAIL PROTECTED] wrote: ~| ColdFusion MX7 and Flex 2 Build sales

Re: CFset problem

2007-01-31 Thread Patrick Farabee
Your select statement will always return 1 row, and it will either contain the max number, or So, use: cfquery name=qryHighestNum datasource=ocreodsn Select Max(ReqNum) as HighestNumber from PrintingReq /cfquery cfset NextReqNumber = val(qryHighestNum.HighestNumber) + 1 No need for a cfif

  1   2   3   4   5   >