Dynamic variable names in QuerySetCell

2003-12-16 Thread Ryan Kime
I'm trying to avoid Evaluate and have hit a wall. I am trying to dynamically call column names from qResults and set the values in a QuerySetCell - val1, val2, val3, val4, etc... Here's an example: cfset Monthly2003= QueryNew(month, dollar_amount) cfset QueryAddRow(Monthly2003, 12) cfloop

re: Dynamic variable names in QuerySetCell

2003-12-16 Thread Scott Brady
Original Message: From: Ryan Kime [EMAIL PROTECTED] cfloop index=LoopCount from=1 to=12 cfset QuerySetCell(Monthly2003, month, curMonth, LoopCount) cfset QuerySetCell(Monthly2003, dollar_amount, qResults[valLoopCount], LoopCount) /cfloop The second QuerySetCell is what is killing me. It

RE: Dynamic variable names in QuerySetCell

2003-12-16 Thread Ryan Kime
Good question Scott, the recordcount of qResults will always be 1. FYI, adding the [1] worked! Thanks! -Original Message- From: Scott Brady [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 3:05 PM To: CF-Talk Subject: re: Dynamic variable names in QuerySetCell Original

-OT- Javascript - Dynamic Variable Names

2002-10-02 Thread Thane Sherrington
If someone knows of a good Javascript list where I can ask this, let me know and I'll go there. I'm trying to loop in Javascript and create a dynamic variable name in each loop (the way I can do a variablename#loopvalue# in CF.) Any idea how I could do this? I'm trying to access form

Re: -OT- Javascript - Dynamic Variable Names

2002-10-02 Thread Marlon Moyer
www.irt.org is a great resource and here's a link to an answer to your question: http://developer.irt.org/script/809.htm Marlon Thane Sherrington wrote: If someone knows of a good Javascript list where I can ask this, let me know and I'll go there. I'm trying to loop in Javascript and

Re: -OT- Javascript - Dynamic Variable Names

2002-10-02 Thread Thane Sherrington
At 06:40 AM 02/10/02 -0500, Marlon Moyer wrote: www.irt.org is a great resource and here's a link to an answer to your question: Thanks. That appears to have solved it. T ~| Archives:

Dynamic Variable Names

2001-06-07 Thread Jen R
Ok...I was recently sitting in a meeting with some people in my department about an application I'm developing. Seeing as I am *the* developer I could really use some help. It's an estimating/billing application. There is a possibility of twenty different lines for materials used and

RE: Dynamic Variable Names

2001-06-07 Thread Jann VanOver
Here's the magic you need: #evaluate(form.materiali)# -Original Message- From: Jen R [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 12:17 PM To: CF-Talk Subject: Dynamic Variable Names In my database I have the fields material1, material2, material3, material4

Re: Dynamic Variable Names

2001-06-07 Thread Darren Houle
I know you said you tried evaluate but in this case it would seem to be the way to go. What was the output? Did you get the syntax wrong? Why is it that evaluate didn't work for you? Assuming there will always be at least one material [psuedocode - you fill in the cf tags] sql = insert

Re: Dynamic Variable Names

2001-06-07 Thread Jon Hall
[EMAIL PROTECTED] Sent: Thursday, June 07, 2001 3:16 PM Subject: Dynamic Variable Names Ok...I was recently sitting in a meeting with some people in my department about an application I'm developing. Seeing as I am *the* developer I could really use some help. It's an estimating/billing

RE: Dynamic Variable Names

2001-06-07 Thread Sicular, Alexander
: Dynamic Variable Names Ok...I was recently sitting in a meeting with some people in my department about an application I'm developing. Seeing as I am *the* developer I could really use some help. It's an estimating/billing application. There is a possibility of twenty different lines

Dynamic variable names

2001-05-24 Thread Andy Ewings
Can you have dynamic variable names in CF?e.g in an action page could you have something like - cfset thelist = cfloop from=1 to=3 index=id cfset thevalue = Evaluate(form.fieldnum #id#) cfset thelist = ListAppend(thelist, thevalue) /cfloop where there are form fileds

RE: Dynamic variable names

2001-05-24 Thread DeVoil, Nick
How about cfset thelist = cfloop from=1 to=3 index=id cfset thelist = ListAppend(thelist, Evaluate(form.fieldnum#id#)) /cfloop Nick -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 24, 2001 4:23 PM To: CF-Talk Subject: Dynamic variable names

RE: Dynamic variable names

2001-05-24 Thread Dylan Bromby
) cfset thelist = ListAppend(thelist, thevalue) /cfloop -Original Message- From: Andy Ewings [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 24, 2001 8:23 AM To: CF-Talk Subject: Dynamic variable names Can you have dynamic variable names in CF?e.g in an action page could you have

RE: Dynamic variable names

2001-05-24 Thread Raymond Camden
Email : [EMAIL PROTECTED] ICQ UIN : 3679482 My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: Dylan Bromby [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 24, 2001 12:22 PM To: CF-Talk Subject: RE: Dynamic variable names yes you can do it. i use

RE: Dynamic Variable Names

2001-05-04 Thread Semrau, Steven L Mr SRA
2:42 PM To: CF-Talk Subject: Dynamic Variable Names I want to dynamically create a variable name based upon a url variable. First I set up a couple of strings: CFSET qs = 'q' CFSET qn = #Insert(url.q, qs, 1)# Where q is a number from 1-37 passed via url variable. Let's say that url.q is 7

Re: Dynamic Variable Names

2001-05-04 Thread Joshua Meekhof
assuming that once you have retrieved the record the value of qn is no significant, try alias the value in the query: CFQUERY NAME=get_results DATASOURCE=datasource SELECT #qn# as foo FROM database /CFQUERY Jenny Anderson wrote: I want to dynamically create a variable name based

RE: Dynamic Variable Names

2001-05-04 Thread Diana Nichols
:[EMAIL PROTECTED]] Sent: Friday, May 04, 2001 1:38 PM To: CF-Talk Subject: Re: Dynamic Variable Names assuming that once you have retrieved the record the value of qn is no significant, try alias the value in the query: CFQUERY NAME=get_results DATASOURCE=datasource SELECT #qn# as foo

Re: Dynamic Variable Names

2001-05-04 Thread Jose Alberto Guerra Ugalde
Meekhof [mailto:[EMAIL PROTECTED]] Sent: Friday, May 04, 2001 1:38 PM To: CF-Talk Subject: Re: Dynamic Variable Names assuming that once you have retrieved the record the value of qn is no significant, try alias the value in the query: CFQUERY NAME=get_results DATASOURCE=datasource SELECT

Dynamic Variable Names

2001-05-03 Thread Jenny Anderson
I want to dynamically create a variable name based upon a url variable. First I set up a couple of strings: CFSET qs = 'q' CFSET qn = #Insert(url.q, qs, 1)# Where q is a number from 1-37 passed via url variable. Let's say that url.q is 7. Then qn is 'q7'. So I query the database like this:

Re: Dynamic Variable Names

2001-05-03 Thread Tony Schreiber
#Evaluate(qn)# I want to dynamically create a variable name based upon a url variable. First I set up a couple of strings: CFSET qs = 'q' CFSET qn = #Insert(url.q, qs, 1)# Where q is a number from 1-37 passed via url variable. Let's say that url.q is 7. Then qn is 'q7'. So I query

Dynamic Variable Names

2001-01-16 Thread Martin S
Hi, In this example I have two pages...with a form post inbetween. The first page has a lot of text boxes called ID1 to ID16 (so, 16 in total ;) ).these boxes are in a database loop (thus the number to differentiate them). Also over time the number may change from 16 to 18 etc..so there

RE: Dynamic Variable Names

2001-01-16 Thread Raymond B.
if (field eq "Custom") { // do this is custom } else { // do this if not } x = x + 1 ; } cfscript -Original Message- From: Martin S [mailto:[EMAIL PROTECTED]] Sent: January 16, 2001 21:

RE: Dynamic Variable Names in a CFSET

2000-11-06 Thread Dave Watts
cfset rs = SetVariable("choice" count, blah) Does rs have any special meaning or does it not matter? No, it's a dummy variable. It stands for "return string". In fact, as has been pointed out before, you could omit the left side of the CFSET, and it would still work: cfset

RE: Dynamic Variable Names in a CFSET

2000-11-05 Thread Dave Watts
What's the best way to dynamically name variables used in a CFSET tag? I want them named choice0, choice1, etc up through however many loops are made: CFSET choice#count# = blah (which does not work but illustrates what I'm trying to do. As many people have already pointed out, you

Re: Dynamic Variable Names in a CFSET

2000-11-05 Thread Jon Hall
Does rs have any special meaning or does it not matter? jon cfset rs = SetVariable("choice" count, blah) Of those two, I'd recommend the second, simply because it will be supported in future versions of CF, while the first one may not be. However, you might consider using a

RE: Dynamic Variable Names in a CFSET

2000-11-03 Thread Kedar Desai
This code works: cfset "choice#count#" = blah -Original Message- From: David Shadovitz [mailto:[EMAIL PROTECTED]] Sent: Friday, November 03, 2000 12:39 AM To: CF-Talk Subject: Re: Dynamic Variable Names in a CFSET cfset tmp = SetVariable("choice#count#", blah) -

Dynamic Variable Names in a CFSET

2000-11-02 Thread David Hannum
Hello, What's the best way to dynamically name variables used in a CFSET tag? I want them named choice0, choice1, etc up through however many loops are made: CFSET choice#count# = blah (which does not work but illustrates what I'm trying to do. Thanks, Dave

Re: Dynamic Variable Names in a CFSET

2000-11-02 Thread Gena
Check EVALUATE and DE functions Gennadi - Original Message - From: "David Hannum" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Friday, November 03, 2000 3:06 PM Subject: Dynamic Variable Names in a CFSET Hello, What's the best way to dynamically

RE: Dynamic Variable Names in a CFSET

2000-11-02 Thread Peter Alexandrou
cfset "choice#count#" = blah -Original Message- From: David Hannum [mailto:[EMAIL PROTECTED]] Sent: Friday, 3 November 2000 15:06 To: CF-Talk Subject: Dynamic Variable Names in a CFSET Hello, What's the best way to dynamically name variables used in a CFSET tag?

RE: Dynamic Variable Names in a CFSET

2000-11-02 Thread Scott Wood
: Dynamic Variable Names in a CFSET Hello, What's the best way to dynamically name variables used in a CFSET tag? I want them named choice0, choice1, etc up through however many loops are made: CFSET choice#count# = blah (which does not work but illustrates what I'm trying to do. Thanks, Dave

Re: Dynamic Variable Names in a CFSET

2000-11-02 Thread Max Paperno
Dave, you're real close. Just do CFSET "choice#count#" = blah There's also the SetVariable() function that can be used to do the same thing (check the docs). I'm not sure there's much of an advantage to either way of doing it. I believe the above example only works with CF4 and up, while

RE: Dynamic Variable Names in a CFSET

2000-11-02 Thread Norman Elton
Try: CFSET "choice#count#" = blah Norman Elton Information Technology College of William Mary -Original Message- From: David Hannum [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 02, 2000 11:06 PM To: CF-Talk Subject: Dynamic Variable Names in a CFSET Hello, What'

Re: Dynamic Variable Names in a CFSET

2000-11-02 Thread David Shadovitz
cfset tmp = SetVariable("choice#count#", blah) -David On Thu, 2 Nov 2000 23:06:20 -0500 "David Hannum" [EMAIL PROTECTED] writes: Hello, What's the best way to dynamically name variables used in a CFSET tag? I want them named choice0, choice1, etc up through however many loops are