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

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,

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
The problem you are having is because of the database structure. Those materials fields need to be in a different table with another field that relates to the project. Any time you have a 1 to Many relationship like these 20 materials to 1 project, it cries out for two tables. Here is some

RE: Dynamic Variable Names

2001-06-07 Thread Sicular, Alexander
evaluate is the least of your problems. lets start with the database. it is not normalized. read : http://www.swynk.com/friends/putnam/normarticle.asp for a better explanation. basically, whenever you find yourself making column names that end with a number, you have a non-normalized table

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
yes you can do it. i use Evaluate() with dynamic values all the time. try removing the from #id#. if that doesn't work (it should), try something like: cfset thelist = cfloop from=1 to=3 index=id cfset tempvalue = form.fieldnum#id# cfset thevalue = Evaluate(tempvalue)

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
Try referring to it as get_results.#qn# Steven Semrau SRA International, Inc. Senior Member, Professional Staff [EMAIL PROTECTED] [EMAIL PROTECTED] Com: (703) 805-1095 DSN: (703) 655-1095 -Original Message- From: Jenny Anderson [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 03, 2001

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

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

RE: Dynamic Variable Names

2001-01-16 Thread Raymond B.
You're trouble is you're not using the evaluate() function (and you're using # gratuitously :). cfset varname = evaluate("form.id" x) This will now be the value of from.id1 instead of the string "form.id1" (through whatever). There are other ways to handle this as well. One

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) -

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 name variables used in a

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? I want

RE: Dynamic Variable Names in a CFSET

2000-11-02 Thread Scott Wood
just set a loop from n to n to populate..(cfloop).. Hope that shoots you in the rite direction.. G. Scott Wood Developer HMWeb.com 520-742-2611 Ext.135 -Original Message- From: David Hannum [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 02, 2000 9:06 PM To: CF-Talk Subject:

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's the best

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