Re: Dynamic variable Name in cfif

2014-07-18 Thread Dave Watts

> Also, shouldn't it be
>
> 
>
> ???
>
> or is it the current trend to use EQ when checking a text field nowadays? :)

They're equivalent, so it doesn't matter which one you use. It's
purely a matter of personal preference.

Dave Watts, CTO, Fig Leaf Software
1-202-527-9569
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358913
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Dynamic variable Name in cfif

2014-07-18 Thread Phillip Vector

Also, shouldn't it be



???

or is it the current trend to use EQ when checking a text field nowadays? :)


On Fri, Jul 18, 2014 at 6:22 AM, Dave Watts  wrote:

>
> > I'm having no trouble setting and outputting a dynamic variable name:
> >
> > Expires_#UpdateMe#= #form[ 'Expires_' & UpdateMe]#
> >
> >
> > but when I go to evaluate that variable:
> >
> > 
> >
> > it returns:
> >
> > Variable YES is undefined
> >
> > because the VALUE of the Variable named "Expires7" is indeed "YES".
>
> Without quotes around "Yes", CF sees it as a variable name, not a
> literal string.
>
> Dave Watts, CTO, Fig Leaf Software
> 1-202-527-9569
> http://www.figleaf.com/
> http://training.figleaf.com/
>
> Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
> GSA Schedule, and provides the highest caliber vendor-authorized
> instruction at our training centers, online, or onsite.
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358912
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Dynamic variable Name in cfif

2014-07-18 Thread Dave Watts

> I'm having no trouble setting and outputting a dynamic variable name:
>
> Expires_#UpdateMe#= #form[ 'Expires_' & UpdateMe]#
>
>
> but when I go to evaluate that variable:
>
> 
>
> it returns:
>
> Variable YES is undefined
>
> because the VALUE of the Variable named "Expires7" is indeed "YES".

Without quotes around "Yes", CF sees it as a variable name, not a
literal string.

Dave Watts, CTO, Fig Leaf Software
1-202-527-9569
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358902
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Dynamic variable Name in cfif

2014-07-18 Thread Marie Taylore

I'm having no trouble setting and outputting a dynamic variable name:

Expires_#UpdateMe#= #form[ 'Expires_' & UpdateMe]#


but when I go to evaluate that variable:



it returns:

Variable YES is undefined

because the VALUE of the Variable named "Expires7" is indeed "YES".

I know there's a simple fix to this, but can't remember how.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358899
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Dynamic Variable

2012-09-12 Thread Torrent Girl

>>I presume you have the dynamic part in another variable, in which case you
>
>I do. I'll try that. Thank you.
>
>But wait. won't this give me a value of '1A'?


it's been a while since this post but thanks Russ that worked. 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352516
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Dynamic Variable

2012-07-03 Thread Russ Michaels

yes but presumably you are chagning that value, if not then you have
nothing to work with. You need to be generating the dynamic name you plan
to use somehow.

On Wed, Jul 4, 2012 at 7:53 PM, Torrent Girl  wrote:

>
> >I presume you have the dynamic part in another variable, in which case you
> >could do this.
> >
> > >index="i">
> >
> >
> >
> >
> >>
>
> I do. I'll try that. Thank you.
>
> But wait. won't this give me a value of '1A'?
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351825
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Dynamic Variable

2012-07-03 Thread Leigh


>  the arrays are set into session: 
> 
 
> To access the element dynamically, use structure notation, ie:   
>  session["ceuAppModules"& theDynamicSuffixHere 
 
Obviously there should be a closing bracket "]". The response was cut off for 
some reason 


-
Leigh

some extra text here just to see where the message is cut off .

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351824
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Dynamic Variable

2012-07-03 Thread Leigh



>  the arrays are set into session: 
> 
 
To access the element dynamically, use structure notation, ie:   

   session["ceuAppModules"& theDynamicSuffixHere 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351823
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Dynamic Variable

2012-07-03 Thread Torrent Girl

>I presume you have the dynamic part in another variable, in which case you
>could do this.
>
>index="i">
>
>
>
>
>>

I do. I'll try that. Thank you.

But wait. won't this give me a value of '1A'?



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351822
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Dynamic Variable

2012-07-03 Thread Russ Michaels

I presume you have the dynamic part in another variable, in which case you
could do this.




On Wed, Jul 4, 2012 at 6:56 PM, Torrent Girl  wrote:

>
> hi All.
>
> I have an application that creates an array based on a few variables.
>
> The application enters the contents of the array into a DB by looping over
> the array.
>
> My issue is that I need the array name in the loop to be dynamic based on
> another var I have set. EX: 
>
> Here is how it goes:
>
> The arrays are set into session:
>
> 
>
> 
>  session.ceuAppModules1A,
> "#INTMODULEID#"
> ) />
> 
>
>
> The 1A part of the array name is what can change. It can be 1B, 4A, etc.
>
>
> What I would like to do is when I enter the contents of the array into the
> DB, I'd like the name of the array loop to be dynamic:
>
> Here is my loop:
>
> 
>
> I want the "1A" part of the array name to be dynamic but I have spent too
> much time trying to come up with the correct syntax.
>
> Any suggestions?
>
>
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351821
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Dynamic Variable

2012-07-03 Thread Torrent Girl

hi All.

I have an application that creates an array based on a few variables.

The application enters the contents of the array into a DB by looping over the 
array.

My issue is that I need the array name in the loop to be dynamic based on 
another var I have set. EX: 

Here is how it goes:

The arrays are set into session: 








The 1A part of the array name is what can change. It can be 1B, 4A, etc.


What I would like to do is when I enter the contents of the array into the DB, 
I'd like the name of the array loop to be dynamic:

Here is my loop:



I want the "1A" part of the array name to be dynamic but I have spent too much 
time trying to come up with the correct syntax.

Any suggestions?





~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351820
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Creating a dynamic variable to for storage

2009-04-22 Thread Fawzi Amadu

Thanks, Ben and Adrian that solved my problem.

Wrap the whole variable name in quotes:
>
>
>
>
>-- 
>Ben Nadel
>Adobe Community Expert
>Adobe Certified Advanced ColdFusion Developer
>Manager New York ColdFusion User Group
>http://www.bennadel.com
>
>Need ColdFusion Help?
>http://www.bennadel.com/Ask-Ben 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321843
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Creating a dynamic variable to for storage

2009-04-22 Thread Ben Nadel

Wrap the whole variable name in quotes:




-- 
Ben Nadel
Adobe Community Expert
Adobe Certified Advanced ColdFusion Developer
Manager New York ColdFusion User Group
http://www.bennadel.com

Need ColdFusion Help?
http://www.bennadel.com/Ask-Ben


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321840
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Creating a dynamic variable to for storage

2009-04-22 Thread Adrian Lynch



Give that a go.

Adrian

> -Original Message-
> From: Fawzi Amadu [mailto:abd...@gmail.com]
> Sent: 22 April 2009 19:35
> To: cf-talk
> Subject: Creating a dynamic variable to for storage
> 
> 
> I have a loop within which I am trying to create a various variable. My
> code (below) is replying an error which I believe is due the my syntax
> being wrong. Please advise on how to construct such variable creation.
> 
> 
> Code:
> 
> 
> 
> Error:
> 
> Invalid CFML construct found on line 75 at column 34.
> 
> ColdFusion was looking at the following text:
> \"
> 
> TIA


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321839
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Creating a dynamic variable to for storage

2009-04-22 Thread Fawzi Amadu

I have a loop within which I am trying to create a various variable. My code 
(below) is replying an error which I believe is due the my syntax being wrong. 
Please advise on how to construct such variable creation.


Code:



Error:

Invalid CFML construct found on line 75 at column 34.

ColdFusion was looking at the following text:
\"

TIA 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321838
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: dynamic variable

2009-03-24 Thread Aaron Rouse

You do not need the evaluate functions, I would do something like:
Variables["product_price_#c#"] = getProduct["product_price_#c#"][1];

The one being the placement in the query, I am just assuming it will return
only one row and always one row and that is all you care to reference.

On Tue, Mar 24, 2009 at 10:18 PM, Mike Little wrote:

>
> ok, for...
>
> for (i=1; i LTE listLen(currencies); i=i+1) {
> c = listGetAt(currencies, i);
> product_price_"#c#" = evaluate('getProduct.product_price_' & c);
> product_price_sale_"#c#" = evaluate('getProduct.product_price_sale_' & c);
> }
>
> i still get...
>
> ColdFusion was looking at the following text:
> \"
>
> The CFML compiler was processing:
>
> A script statement beginning with product_price_ on line 98, column 2.
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320902
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: dynamic variable

2009-03-24 Thread Mike Little

ok, for...

for (i=1; i LTE listLen(currencies); i=i+1) {
c = listGetAt(currencies, i);
product_price_"#c#" = evaluate('getProduct.product_price_' & c);
product_price_sale_"#c#" = evaluate('getProduct.product_price_sale_' & c);
}

i still get...

ColdFusion was looking at the following text:
\"

The CFML compiler was processing:

A script statement beginning with product_price_ on line 98, column 2. 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320901
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: dynamic variable

2009-03-24 Thread Jason Fisher

You're getting the numeric index, rather than the currency value.  Try this, 
assuming that the database has columns like 'product_price_eur'.

for (i=1; i LTE listLen(currencies); i=i+1) {
 c = listGetAt(currencies, i);
 product_price_"#c#" = evaluate('getProduct.product_price_' & c);
 product_price_sale_"#c#" = evaluate('getProduct.product_price_sale_' & c);
}




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320897
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: dynamic variable

2009-03-24 Thread Nick G

In cfscript you have to use listGetAt(),  something like so:

currencies = "eur,usd";

for (i=1; i LTE listLen(currencies); i=i+1) {

curDenominator = ListGetAt(currencies, i);

"product_price_#curDenominator#" =
getProduct["product_price_#curDenominator#"] ;

"product_price_sale_#curDenominator#" =
getProduct["product_price_#curDenominator#"];

}




On Tue, Mar 24, 2009 at 6:55 PM, Mike Little  wrote:

>
> hey guys,
>
> doing some very wrong here...
>
> for (i=1; i LTE listLen(currencies); i=i+1) {
> product_price_"#i#" = evaluate('getProduct.product_price_' & i);
> product_price_sale_"#i#" = evaluate('getProduct.product_price_sale_' & i);
> }
>
> basically i want to assign a database field to the following vars...
>
> product_price_eur
> product_price_sale_eur
> product_price_usd
> product_price_sale_usd
>
> my list..
>
> currencies = "eur,usd"
>
> any help would be appreciated.
>
> mike
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320896
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: dynamic variable

2009-03-24 Thread Azadi Saryev

something like this?

for (i=1; i LTE listLen(currencies); i=i+1) {
product_price_#listGetAt(currencies, i)# = getProduct['product_price_' & 
listGetAt(currencies, i)];
product_price_sale_#listGetAt(currencies, i)# = 
getProduct['product_price_sale_' & listGetAt(currencies, i)];
}


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Mike Little wrote:
> hey guys,
>
> doing some very wrong here...
>
> for (i=1; i LTE listLen(currencies); i=i+1) {
> product_price_"#i#" = evaluate('getProduct.product_price_' & i);
> product_price_sale_"#i#" = evaluate('getProduct.product_price_sale_' & i);
> }
>
> basically i want to assign a database field to the following vars...
>
> product_price_eur
> product_price_sale_eur
> product_price_usd
> product_price_sale_usd
>
> my list..
>
> currencies = "eur,usd"
>
> any help would be appreciated.
>
> mike 
>   

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320895
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: dynamic variable

2009-03-24 Thread Charlie Griefer

for (i=1; i LTE listLen(currencies); i=i+1) {
   variables['product_price_' & i] = getProduct['product_price_' & i];
   variables['product_price_sale_' & i] = getProduct['product_price_sale_' &
i];
}

give that a shot?

On Tue, Mar 24, 2009 at 6:55 PM, Mike Little  wrote:

>
> hey guys,
>
> doing some very wrong here...
>
> for (i=1; i LTE listLen(currencies); i=i+1) {
> product_price_"#i#" = evaluate('getProduct.product_price_' & i);
> product_price_sale_"#i#" = evaluate('getProduct.product_price_sale_' & i);
> }
>
> basically i want to assign a database field to the following vars...
>
> product_price_eur
> product_price_sale_eur
> product_price_usd
> product_price_sale_usd
>
> my list..
>
> currencies = "eur,usd"
>
> any help would be appreciated.
>
> mike
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320894
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: dynamic variable

2009-03-24 Thread James Holmes

If you are going to use cfscript, you don't have a way to do a list
loop as you would in cfloop; i is a numeric in your code, not the list
item. So, you need listGetAt() to get the list item at i.

mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/



2009/3/25 Mike Little :
>
> hey guys,
>
> doing some very wrong here...
>
> for (i=1; i LTE listLen(currencies); i=i+1) {
> product_price_"#i#" = evaluate('getProduct.product_price_' & i);
> product_price_sale_"#i#" = evaluate('getProduct.product_price_sale_' & i);
> }
>
> basically i want to assign a database field to the following vars...
>
> product_price_eur
> product_price_sale_eur
> product_price_usd
> product_price_sale_usd
>
> my list..
>
> currencies = "eur,usd"
>
> any help would be appreciated.
>
> mike
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320893
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: dynamic variable

2009-03-24 Thread Dan Baughman

Use a struxt with

Somestruct[variable]

Variable will be evaluated before being accessed as a member od somestrict.





On 3/24/09, Mike Little  wrote:
>
> hey guys,
>
> doing some very wrong here...
>
> for (i=1; i LTE listLen(currencies); i=i+1) {
> product_price_"#i#" = evaluate('getProduct.product_price_' & i);
> product_price_sale_"#i#" = evaluate('getProduct.product_price_sale_' & i);
> }
>
> basically i want to assign a database field to the following vars...
>
> product_price_eur
> product_price_sale_eur
> product_price_usd
> product_price_sale_usd
>
> my list..
>
> currencies = "eur,usd"
>
> any help would be appreciated.
>
> mike
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320892
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


dynamic variable

2009-03-24 Thread Mike Little

hey guys,

doing some very wrong here...

for (i=1; i LTE listLen(currencies); i=i+1) {
product_price_"#i#" = evaluate('getProduct.product_price_' & i);
product_price_sale_"#i#" = evaluate('getProduct.product_price_sale_' & i);
}

basically i want to assign a database field to the following vars...

product_price_eur
product_price_sale_eur
product_price_usd
product_price_sale_usd

my list..

currencies = "eur,usd"

any help would be appreciated.

mike 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320891
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: checking for the existence of a dynamic variable

2008-10-14 Thread Scott Stewart
grinding code out quickly

Peter Boughton wrote:
>> 
>>
>>
>>
>>   
>>
>> 
>> 
>
> What's up with that odd looping? :/
>
>
> It seems like your code could be simplified...
>
> 
>AND form["MGMT_HEADER_"&i] is not "">
>   
> 
> 
>
> (with the structkeyexists added where I assume you want it)
>
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313876
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: checking for the existence of a dynamic variable

2008-10-14 Thread Peter Boughton
>
>
>
>
>   
>
>

What's up with that odd looping? :/


It seems like your code could be simplified...







(with the structkeyexists added where I assume you want it)



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313868
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: checking for the existence of a dynamic variable

2008-10-14 Thread Scott Stewart
Thank you sir,

that worked like a champ :)

sas

Azadi Saryev wrote:
> 
>
> Azadi Saryev
> Sabai-dee.com
> http://www.sabai-dee.com/
>
>
>
> Scott Stewart wrote:
>   
>> 
>> 
>> 
>> 
>>
>> 
>> 
>>
>>
>> Hey all,
>>
>> the above code returns the error  "Element MGMT_HEADER_2 is undefined in 
>> a Java object of type class coldfusion.filter.FormScope."
>>
>> How would I code the "IsDefined" for this?
>>
>>
>>   
>> 
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313865
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: checking for the existence of a dynamic variable

2008-10-14 Thread Azadi Saryev


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Scott Stewart wrote:
> 
> 
> 
> 
>
> 
> 
>
>
> Hey all,
>
> the above code returns the error  "Element MGMT_HEADER_2 is undefined in 
> a Java object of type class coldfusion.filter.FormScope."
>
> How would I code the "IsDefined" for this?
>
>
>   

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313860
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


checking for the existence of a dynamic variable

2008-10-14 Thread Scott Stewart




   




Hey all,

the above code returns the error  "Element MGMT_HEADER_2 is undefined in 
a Java object of type class coldfusion.filter.FormScope."

How would I code the "IsDefined" for this?


-- 
Scott Stewart
ColdFusion Developer

Office of Research Information Systems
Research & Economic Development
University of North Carolina at Chapel Hill

Phone:(919)843-2408
Fax: (919)962-3600
Email: [EMAIL PROTECTED]



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313859
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: using dynamic variable in cfset statement

2008-09-10 Thread Judah McAuley
I just consider Evaluate to be sloppy coding. It is (almost) never needed as
it basically tells coldfusion to do something it already is doing: "look at
this and see if its a variable".  It is by no means the worst thing in the
world but to the extent that you can cut it out of your code, I think you do
yourself a favor by coding more cleanly (and increasing execution efficiency
even if only a little).

Judah

On Wed, Sep 10, 2008 at 2:16 PM, Brad Wood <[EMAIL PROTECTED]> wrote:

> Well according to a quick (iterative) test on CF 8.0.1 evaluate seems to be
> about 5 times slower than the array notation.
> Of course, we're still talking about the difference between 1 ms and 5
> ms's.
>
> I think that is very good information to know and use, but frankly I would
> agree that readability should take precedence until you run into a page
> doing enough processing to actually matter.
> I think the whole witch-hunt mentality is a little obtuse.   :)
>
> ~Brad
>
> - Original Message -
> From: "Raymond Camden" <[EMAIL PROTECTED]>
> To: "CF-Talk" 
> Sent: Wednesday, 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 recommend against Evaluate I do so on readability terms
> > rather than performance. For almost every use of evaluate I see in the
> > field, the code can be rewritten in a cleaner, easier to understand
> > manner.
> >
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312359
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: using dynamic variable in cfset statement

2008-09-10 Thread Brad Wood
Well according to a quick (iterative) test on CF 8.0.1 evaluate seems to be 
about 5 times slower than the array notation.
Of course, we're still talking about the difference between 1 ms and 5 ms's.

I think that is very good information to know and use, but frankly I would 
agree that readability should take precedence until you run into a page 
doing enough processing to actually matter.
I think the whole witch-hunt mentality is a little obtuse.   :)

~Brad

- Original Message - 
From: "Raymond Camden" <[EMAIL PROTECTED]>
To: "CF-Talk" 
Sent: Wednesday, 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 recommend against Evaluate I do so on readability terms
> rather than performance. For almost every use of evaluate I see in the
> field, the code can be rewritten in a cleaner, easier to understand
> manner.
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312356
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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

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. For almost every use of evaluate I see in the field, the
code can be rewritten in a cleaner, easier to understand manner.




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312299
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312298
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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 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. For almost every use of evaluate I see in the
field, the code can be rewritten in a cleaner, easier to understand
manner.

On Wed, Sep 10, 2008 at 4:41 AM, Adrian Lynch <[EMAIL PROTECTED]>
wrote:
> 
>I didn't!
> 
>
> :OD
>
> -Original Message-
> From: Charlie Griefer [mailto:[EMAIL PROTECTED]
>
> 
> 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.  participating is how you
learn.
> keep doing what you're doing.
> 
>
> :)
>
>



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312297
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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. For almost every use of evaluate I see in the
field, the code can be rewritten in a cleaner, easier to understand
manner.

On Wed, Sep 10, 2008 at 4:41 AM, Adrian Lynch <[EMAIL PROTECTED]> wrote:
> 
>I didn't!
> 
>
> :OD
>
> -Original Message-
> From: Charlie Griefer [mailto:[EMAIL PROTECTED]
>
> 
> 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.  participating is how you learn.
> keep doing what you're doing.
> 
>
> :)
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312296
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: using dynamic variable in cfset statement

2008-09-10 Thread Adrian Lynch

I didn't!


:OD

-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED]


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.  participating is how you learn.
keep doing what you're doing.


:)

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312293
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: using dynamic variable in cfset statement

2008-09-09 Thread Bobby Hartsfield
Yeah, but it never stops. We still laugh at Will T. every chance we get.

..:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com


-Original Message-
From: Patrick Santora [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 09, 2008 5:38 PM
To: CF-Talk
Subject: Re: using dynamic variable in cfset statement

It's kind of like a right of passage

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 :)
>
> 
> 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.  participating is how you
learn.
> keep doing what you're doing.
> 
>
> :)
>
> 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, and trying. :)> hehe :)  > Ouch!
> > Evaluate
> > _
> > See how Windows Mobile brings your life together?at home, work, or on
the
> > go.
> > http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/
> >
> >
>
> 



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312281
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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
_
Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312280
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: using dynamic variable in cfset statement

2008-09-09 Thread Ian Skinner
Casey Dougall wrote:
> 
>   
> 

Or the same thing with a few less pound signs and quotes.



Or to completely eliminate the loop, but then you will be working with a 
record set rather then a simple structure.





~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312279
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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 somewhere that says, "here's some 
code, but don't use this. It's really BAD. It works, but you shouldn't use 
it...".
 
I mean, why is it there if you are not supposed to use it. It's like Eve and 
the apple all over again...
 
~ David
_
See how Windows Mobile brings your life together—at home, work, or on the go.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312278
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: using dynamic variable in cfset statement

2008-09-09 Thread Patrick Santora
It's kind of like a right of passage

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 :)
>
> 
> 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.  participating is how you learn.
> keep doing what you're doing.
> 
>
> :)
>
> 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, and trying. :)> hehe :)  > Ouch!
> > Evaluate
> > _
> > See how Windows Mobile brings your life together—at home, work, or on the
> > go.
> > http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/
> >
> >
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312277
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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


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.  participating is how you learn.
keep doing what you're doing.


:)

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, and trying. :)> hehe :)  > Ouch!
> Evaluate
> _
> See how Windows Mobile brings your life together—at home, work, or on the
> go.
> http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312276
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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:
>
> 
>
> 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 key or delete the "." character."
>
>

Just throwing something out here since you are mentioning that you are doing
this by looping over a query. You could set all of those appconfig variables
by looping over the column names.


  



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312275
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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, and trying. :)> hehe :)  > Ouch!
> Evaluate
> _
> See how Windows Mobile brings your life together—at home, work, or on the
> go.
> http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312274
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312273
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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?
> >
> >  > '#appconfig.code_value#'>
> > ~ David Moore
> > _
> > Get more out of the Web. Learn 10 hidden secrets of Windows Live.
> >
> >
> http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008
> <
> http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns%21550F681DAD532637%215295.entry?ocid=TXT_TAGLM_WL_domore_092008
> >
> >
> >
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312272
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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 this:
[#appconfig.code_name#]

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312271
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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?
>
>  '#appconfig.code_value#'>
> ~ David Moore
> _
> Get more out of the Web. Learn 10 hidden secrets of Windows Live.
>
> http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312270
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: using dynamic variable in cfset statement

2008-09-09 Thread David Moore, Jr.
Would something like this work?
 

~ David Moore
_
Get more out of the Web. Learn 10 hidden secrets of Windows Live.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312269
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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.



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312267
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312268
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: using dynamic variable in cfset statement

2008-09-09 Thread Patrick Santora
So are you saying:


or even



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, 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.
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312266
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312265
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312264
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: using dynamic variable in cfset statement

2008-09-09 Thread Dave Watts
> Why does this fail inside a cfoutput loop over a query:
> 
> 

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 of the three
2. 
3. 

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, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312263
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312262
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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 
>
> 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:
> >
> > 
> >
> > 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 key or delete the "." character."
> >
> >
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312261
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: using dynamic variable in cfset statement

2008-09-09 Thread Justin Scott
> Why does this fail inside a cfoutput loop over a query:
> 

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/


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312260
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312259
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: using dynamic variable in cfset statement

2008-09-09 Thread Charlie Griefer
try 

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:
>
> 
>
> 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 key or delete the "." character."
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312258
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


using dynamic variable in cfset statement

2008-09-09 Thread Wally Randall
Why does this fail inside a cfoutput loop over a query:



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 key or delete the "." character." 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312257
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFGRID in CF8 cannot get links with dynamic variable to work

2007-12-30 Thread Azadi Saryev
if the #productid# var you are trying to pass as url var is the same as 
returned in the productid query column - do not pass your own url var then.
use the hrefkey attribute of cfgridcolumn instead (you have it in there 
already as i see). but keep in mind that it adds a HREFKEY url var, not 
productid, so your destination page has to look for url.hrefkey, not 
url.productid...

alternatively, you could amend your query resultset in your cfc to add 
html code to the linked column, including any url vars you want to pass 
- html cfgrid can render html in the column data just fine...

---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com



Michael Grove wrote:
> I am trying to us a CFgrid, Format HTML using a CFC and Bind. The grid 
> renders fine, but I want to include a few columns that either display a small 
> image or a static X. Each of these columns should point to a specific url and 
> pass the parameter.
>
> First off I cannot figure out for the life of me how to pull in a simple 
> variable to pass in the href portion fo teh tag.
>
> 
>  striperows="yes" format="html" 
> bind="cfc:cfc.AdminProducts.getProducts({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"
>  pagesize="30" autowidth="no" width="800">
> 
>  href="../Product_Details.cfm" hrefkey="productid" />
> 
> 
> 
>  href="../Product_Details.cfm?productid=#productid#"  hrefkey="productid" 
> width="60" />
> 
> 
>
> Everytime I run this I get Variable PRODUCTID is undefined.
>
> I have tried placeing everything I can think of in front of the productid 
> viarable but it alwasy tells me that it is undefined.
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295566
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFGRID in CF8 cannot get links with dynamic variable to work

2007-12-30 Thread Philip Hayes
Michael-

I'm interested in this if you find a solution.  I tried something like  
that before finally giving up and taking the easy way out.

Phil


On Dec 29, 2007, at 2:22 PM, Michael Grove wrote:

I am trying to us a CFgrid, Format HTML using a CFC and Bind. The grid  
renders fine, but I want to include a few columns that either display  
a small image or a static X. Each of these columns should point to a  
specific url and pass the parameter.

First off I cannot figure out for the life of me how to pull in a  
simple variable to pass in the href portion fo teh tag.












Everytime I run this I get Variable PRODUCTID is undefined.

I have tried placeing everything I can think of in front of the  
productid viarable but it alwasy tells me that it is undefined.




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295564
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFGRID in CF8 cannot get links with dynamic variable to work

2007-12-30 Thread Cutter (CFRelated)
You can find some info on this at this post:

http://blog.cutterscrossing.com/index.cfm?mode=entry&entry=924FD535-3048-71C2-1732C7C676604ABE

Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
http://blog.cutterscrossing.com

Michael Grove wrote:
> I am trying to us a CFgrid, Format HTML using a CFC and Bind. The grid 
> renders fine, but I want to include a few columns that either display a small 
> image or a static X. Each of these columns should point to a specific url and 
> pass the parameter.
> 
> First off I cannot figure out for the life of me how to pull in a simple 
> variable to pass in the href portion fo teh tag.
> 
> 
>  striperows="yes" format="html" 
> bind="cfc:cfc.AdminProducts.getProducts({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"
>  pagesize="30" autowidth="no" width="800">
> 
>  href="../Product_Details.cfm" hrefkey="productid" />
> 
> 
> 
>  href="../Product_Details.cfm?productid=#productid#"  hrefkey="productid" 
> width="60" />
> 
> 
> 
> Everytime I run this I get Variable PRODUCTID is undefined.
> 
> I have tried placeing everything I can think of in front of the productid 
> viarable but it alwasy tells me that it is undefined.
> 


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295545
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


CFGRID in CF8 cannot get links with dynamic variable to work

2007-12-29 Thread Michael Grove
I am trying to us a CFgrid, Format HTML using a CFC and Bind. The grid renders 
fine, but I want to include a few columns that either display a small image or 
a static X. Each of these columns should point to a specific url and pass the 
parameter.

First off I cannot figure out for the life of me how to pull in a simple 
variable to pass in the href portion fo teh tag.












Everytime I run this I get Variable PRODUCTID is undefined.

I have tried placeing everything I can think of in front of the productid 
viarable but it alwasy tells me that it is undefined.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295527
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFWINDOW, passing a dynamic variable to the URL

2007-12-17 Thread Sean Corfield
On Dec 17, 2007 7:19 AM, Pete Ruckelshaus <[EMAIL PROTECTED]> wrote:
>  minHeight="400" minWidth="400" title="Calendar Details"
> initshow="false"
> source="calendar_details.cfm?date={passDate:dateValue}" />

Add refreshOnShow="true" and see if that fixes your problem.
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294932
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFWINDOW, passing a dynamic variable to the URL

2007-12-17 Thread Raymond Camden
I don't believe there is a way to destroy the window. Just use
ColdFusion.navigate to send it to a new url.

On Dec 17, 2007 9:19 AM, Pete Ruckelshaus <[EMAIL PROTECTED]> wrote:
> Thanks Ray,
>
> Shortly after my original email, I realized that I could use a single form
> with a single hidden field to pass in the value like this:
>
>width="#variables.cellsize#" title="#td_title#" onclick="
> document.passDate.dateValue.value='#dateFormat(getevents.date,
> application.shortdate)#';javascript:ColdFusion.Window.show
> ('calendarDetails')">#dateFormat(getevents.date, "D")#
> so the first onClick passes the required date to the form:
>
>  />
> which, in turn, passes the date into the CFWINDOW call, just like it should:
>
>  minHeight="400" minWidth="400" title="Calendar Details"
> initshow="false"
> source="calendar_details.cfm?date={passDate:dateValue}" />
> And, for good measure, here's my calendar_details.cfm page:
>
> 
> 
>  Untitled
> 
> 
> #URL.date#
> calendar details
> 
> 
> Now, here's the problem.  Clicking on a given date in my calendar displays
> the window, as expected, with that first date's information.  However,
> closing that popped-up window and then clicking on a different date pops up
> the window, but it still has the first date's information.  Is thsi expected
> behavior, or is there a way to "destroy" the first opened window's contents
> and open a new window with new content?  Or does it mean that I would need
> to create 31 instances of cfwindow (one for each day of the month)...which
> is, IMO, unacceptable.
>
> Thanks
>
> Pete
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294918
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFWINDOW, passing a dynamic variable to the URL

2007-12-17 Thread Pete Ruckelshaus
Thanks Ray,

Shortly after my original email, I realized that I could use a single form
with a single hidden field to pass in the value like this:

  #dateFormat(getevents.date, "D")#
so the first onClick passes the required date to the form:


which, in turn, passes the date into the CFWINDOW call, just like it should:


And, for good measure, here's my calendar_details.cfm page:



 Untitled


#URL.date#
calendar details


Now, here's the problem.  Clicking on a given date in my calendar displays
the window, as expected, with that first date's information.  However,
closing that popped-up window and then clicking on a different date pops up
the window, but it still has the first date's information.  Is thsi expected
behavior, or is there a way to "destroy" the first opened window's contents
and open a new window with new content?  Or does it mean that I would need
to create 31 instances of cfwindow (one for each day of the month)...which
is, IMO, unacceptable.

Thanks

Pete


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294917
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFWINDOW, passing a dynamic variable to the URL

2007-12-17 Thread Raymond Camden
Make your link call a JS function. In the JS function, just use
ColdFusion.Window.create to create the window with a dynamic url. Ie,
your link could be:

Day 9

And your function would use a URL of

details.cfm?day="+day

You get the idea I hope. :)

On Dec 17, 2007 8:41 AM, Pete Ruckelshaus <[EMAIL PROTECTED]> wrote:
> Is it possible to pass a dynamic URL variable to the source of a cfwindow
> tag without using forms?  I'm building a calendar and want to allow users to
> click on a date and see details for that date, thus I need to be able to
> pass that date in to my calendar details CF page.
>
> Thanks,
>
> Pete
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294914
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


CFWINDOW, passing a dynamic variable to the URL

2007-12-17 Thread Pete Ruckelshaus
Is it possible to pass a dynamic URL variable to the source of a cfwindow
tag without using forms?  I'm building a calendar and want to allow users to
click on a date and see details for that date, thus I need to be able to
pass that date in to my calendar details CF page.

Thanks,

Pete


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294913
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Dynamic Variable in cfcase statement throws error.

2007-11-12 Thread Dave Watts
> *shrug* he'd already been told cfswitch was not 
> good for what he's trying to do, figured I'd give 
> him a way to do it if he *really* wanted to go 
> that way :)

The problem with that, is that the original poster might actually follow your 
suggestion.

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,
Northern Virginia, or on-site at your location. Visit
http://training.figleaf.com/ for more information!


~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293184
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Dynamic Variable in cfcase statement throws error.

2007-11-12 Thread aegis
*shrug* he'd already been told cfswitch was not good for what he's trying to
do, figured I'd give him a way to do it if he *really* wanted to go that way
:)

-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED] 
Sent: Monday, 12 November 2007 4:01 PM
To: CF-Talk
Subject: RE: Dynamic Variable in cfcase statement throws error.


> it could be slow, but you could write your switch statement
> on the fly into a file with a dynamic name in a temp folder, 
> let your main page include that file, then delete it upon 
> completion.. no idea what that would do to your overheads tho.

Why on earth would you do that? That defeats the purpose of using CFSWITCH.
If you have conditional logic that depends on values that are unknown until
runtime, that's what CFIF is for.

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,
Northern Virginia, or on-site at your location. Visit
http://training.figleaf.com/ for more information!




~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293180
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Dynamic Variable in cfcase statement throws error.

2007-11-11 Thread Dave Watts
> it could be slow, but you could write your switch statement 
> on the fly into a file with a dynamic name in a temp folder, 
> let your main page include that file, then delete it upon 
> completion.. no idea what that would do to your overheads tho.

Why on earth would you do that? That defeats the purpose of using CFSWITCH.
If you have conditional logic that depends on values that are unknown until
runtime, that's what CFIF is for.

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, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!


~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293101
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Dynamic Variable in cfcase statement throws error.

2007-11-11 Thread James Holmes
At that point a series of cfif statements might be a better bet.

On Nov 12, 2007 2:05 PM, Lars Gronholt <[EMAIL PROTECTED]> wrote:
> it could be slow, but you could write your switch statement on the fly into a 
> file with a dynamic name in a temp folder, let your main page include that 
> file, then delete it upon completion.. no idea what that would do to your 
> overheads tho.

-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293099
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Dynamic Variable in cfcase statement throws error.

2007-11-11 Thread Lars Gronholt
it could be slow, but you could write your switch statement on the fly into a 
file with a dynamic name in a temp folder, let your main page include that 
file, then delete it upon completion.. no idea what that would do to your 
overheads tho. 

~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293098
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Dynamic Variable in cfcase statement throws error.

2007-11-11 Thread Jochem van Dieten
Casey Dougall wrote:
> Is there another way I can get around this?

No. Better performance by requiring a constant instead of a variable is 
the whole idea behind switch/case.

Jochem

~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293086
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Dynamic Variable in cfcase statement throws error.

2007-11-11 Thread Casey Dougall
Is there another way I can get around this? I really don't want to manually
type out the values if I don't need to but, the following throws an error
and I know the variable is good.



Putting a dynamic variable in a cfcase statement cf7 throws one ugly error.

Column -1 Detail [empty string] KnownColumn -1 KnownLine -1 KnownText
<unknown>
Line -1 Message This expression must have a constant value.

Casey


~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293085
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Problem Outputting Dynamic Variable from a Query

2007-08-10 Thread Brian Kotek
There is a way, you use the array syntax to get at a specific value in the
query. Someone already posted about how to do this:
#myQuery['myColumn'][rowNumber]#.

To be clear, you don't want to condense your work into a couple of
databases. You want to normalize your single database to keep the data in
the proper tables. Right now you are proposing having separate tables for
every course. So that means every time a course gets added, you have to go
in and actually create a table, indexes, primary keys, and all the rest?
That is extremely inefficient and will absolutely not work over the long
term. So good luck with your study of database design, it's actually pretty
interesting and is something that will be useful knowledge for a very long
time.

On 8/10/07, Zach Firestone <[EMAIL PROTECTED]> wrote:
>
> Thank you for your suggestions. I will definitely look into condensing my
> work into a couple databases. But as far as the problem I had in case I run
> into something like this in the future. I take it there is no way to do what
> I want in ColdFusion. It seems like this would be something more people
> would have run into at some time or another.
>
> >Yes, seriously, I'll jump right behind Brian here - one schema can
> >handle everything you need if properly designed. You're currently
> >solving the wrong problem.
> >
> >
> >>
>
> 

~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285962
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Problem Outputting Dynamic Variable from a Query

2007-08-10 Thread Dominic Watson
There is a way and someone answered it here in this thread (maybe you missed
it):

Assuming you have always one row returned from the query:

#Rate1[time1][1]#

Or, if you have more than one row:


 #Rate1[time1][currentRow]#


Alternatively:

 
 #Rate1.GetString(time1)#



All these work. But you definately need to heed the previous advice.

Dominic



On 10/08/07, Zach Firestone <[EMAIL PROTECTED]> wrote:
>
> Thank you for your suggestions. I will definitely look into condensing my
> work into a couple databases. But as far as the problem I had in case I run
> into something like this in the future. I take it there is no way to do what
> I want in ColdFusion. It seems like this would be something more people
> would have run into at some time or another.
>
> >Yes, seriously, I'll jump right behind Brian here - one schema can
> >handle everything you need if properly designed. You're currently
> >solving the wrong problem.
> >
> >
> >>
>
> 

~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285951
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Problem Outputting Dynamic Variable from a Query

2007-08-10 Thread Zach Firestone
Thank you for your suggestions. I will definitely look into condensing my work 
into a couple databases. But as far as the problem I had in case I run into 
something like this in the future. I take it there is no way to do what I want 
in ColdFusion. It seems like this would be something more people would have run 
into at some time or another.

>Yes, seriously, I'll jump right behind Brian here - one schema can
>handle everything you need if properly designed. You're currently
>solving the wrong problem.
>
>
>> 

~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285949
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Problem Outputting Dynamic Variable from a Query

2007-08-09 Thread James Holmes
Yes, seriously, I'll jump right behind Brian here - one schema can
handle everything you need if properly designed. You're currently
solving the wrong problem.

On 8/10/07, Brian Kotek <[EMAIL PROTECTED]> wrote:
> Then you are definitely approaching this the wrong way. What you want to
> have is a table with all the courses and a table with all the times and
> rates for the courses. Having separate tables for every course is going to
> be completely unmaintainable going forward. Again, I'd urge you to stop
> right now and learn about database design and database normalization. There
> are many good books and web sites on the subject. Ben Forta's SQL book is
> very good and concise. The CF Web Application Construction Kit books also
> cover this in detail. However you do it, you need to hold off on going any
> further until you get a grasp on these ideas because this is critically
> important when building an application that uses a database.
>
> Regards,
>
> Brian
>
>
> On 8/9/07, Zach Firestone <[EMAIL PROTECTED]> wrote:
> >
> > I have to do a database for each course because each course has different
> > rates for each day and time.
> >
> > >First, I think you might consider that the database schema you have here
> > is
> > >not very good. You're going to have a separate database table for every
> > >course? Why would you do this? A much better option would be to have a
> > table
> > >of courses, with course IDs, and another table with times and dates that
> > >link to a course via a foreign key. If any of this sounds unfamiliar to
> > you
> > >I'd urge you to stop right now and read a book or some web tutorials on
> > SQL
> > >and database design, because not only is the critical knowledge to have
> > as a
> > >developer, it is critical to creating a maintainable database structure
> > for
> > >this application.
> > >
> > >
> > >
> > >>
> >
> >
>
> 

~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285937
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Problem Outputting Dynamic Variable from a Query

2007-08-09 Thread Brian Kotek
Then you are definitely approaching this the wrong way. What you want to
have is a table with all the courses and a table with all the times and
rates for the courses. Having separate tables for every course is going to
be completely unmaintainable going forward. Again, I'd urge you to stop
right now and learn about database design and database normalization. There
are many good books and web sites on the subject. Ben Forta's SQL book is
very good and concise. The CF Web Application Construction Kit books also
cover this in detail. However you do it, you need to hold off on going any
further until you get a grasp on these ideas because this is critically
important when building an application that uses a database.

Regards,

Brian


On 8/9/07, Zach Firestone <[EMAIL PROTECTED]> wrote:
>
> I have to do a database for each course because each course has different
> rates for each day and time.
>
> >First, I think you might consider that the database schema you have here
> is
> >not very good. You're going to have a separate database table for every
> >course? Why would you do this? A much better option would be to have a
> table
> >of courses, with course IDs, and another table with times and dates that
> >link to a course via a foreign key. If any of this sounds unfamiliar to
> you
> >I'd urge you to stop right now and read a book or some web tutorials on
> SQL
> >and database design, because not only is the critical knowledge to have
> as a
> >developer, it is critical to creating a maintainable database structure
> for
> >this application.
> >
> >
> >
> >>
>
> 

~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285907
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Problem Outputting Dynamic Variable from a Query

2007-08-09 Thread Janet MacKay
> a separate database table for every course? 

If that's your schema.. Brian makes a very good point.


~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285900
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Problem Outputting Dynamic Variable from a Query

2007-08-09 Thread Zach Firestone
I have to do a database for each course because each course has different rates 
for each day and time.

>First, I think you might consider that the database schema you have here is
>not very good. You're going to have a separate database table for every
>course? Why would you do this? A much better option would be to have a table
>of courses, with course IDs, and another table with times and dates that
>link to a course via a foreign key. If any of this sounds unfamiliar to you
>I'd urge you to stop right now and read a book or some web tutorials on SQL
>and database design, because not only is the critical knowledge to have as a
>developer, it is critical to creating a maintainable database structure for
>this application.
>
>
>
>> 

~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285901
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Problem Outputting Dynamic Variable from a Query

2007-08-09 Thread Zach Firestone
Didn't work. Here's the error it gave me:

Complex object types cannot be converted to simple values.

Zach Firestone
Web/Graphic Design and Internet Marketing
Emerson Communications Corp.
www.EmersonCommunications.com
www.EZReservation.net

(407)387-3001 Phone
(407)387-3002 Fax

-Original Message-
From: austen rustrum [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 09, 2007 6:23 PM
To: CF-Talk
Subject: Re: Problem Outputting Dynamic Variable from a Query

Try #rate1["#time1#"]# instead.  I think that should work.

> Hey,
> 
> I am trying to output a dynamic variable within a ColdFusion query and 
> have hit a wall. I'm creating a golf package website that dynamically 
> pulls course names, tee times, and the cost of tee times. In a form on 
> the previous page they select the tee time, course they want to play, 
> and date they want to play. All these are pulled from a database. Here 
> is my query:
> 
> 
> 
> 
>  "-mm-dd")#>
> 
> SELECT #Time1# FROM #Course1# WHERE Date = '#Date1#'
> 
> 
> So the problem I'm having is outputting the price for that time from 
> the above query. This is what I would have to do do have it display 
> right:
> 
> #Rate1.#Time1##
> 
> But ColdFusion throws an error when I do that because it's improper 
> syntax. I was hoping someone knew of another way I could call the 
> output from the above query. Any insight would be much appreciated. 




~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285895
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Problem Outputting Dynamic Variable from a Query

2007-08-09 Thread Charlie Griefer
Rate1[Time1][n]

where 'n' is the row number.

if you're in a query driven , you can use the 'currentrow'
variable for 'n'.

On 8/9/07, Zach Firestone <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I am trying to output a dynamic variable within a ColdFusion query and have 
> hit a wall. I'm creating a golf package website that dynamically pulls course 
> names, tee times, and the cost of tee times. In a form on the previous page 
> they select the tee time, course they want to play, and date they want to 
> play. All these are pulled from a database. Here is my query:
>
>
> 
> 
> 
> 
> SELECT #Time1# FROM #Course1# WHERE Date = '#Date1#'
> 
>
> So the problem I'm having is outputting the price for that time from the 
> above query. This is what I would have to do do have it display right:
>
> #Rate1.#Time1##
>
> But ColdFusion throws an error when I do that because it's improper syntax. I 
> was hoping someone knew of another way I could call the output from the above 
> query. Any insight would be much appreciated.
>
> 

~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285893
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Problem Outputting Dynamic Variable from a Query

2007-08-09 Thread Brian Kotek
First, I think you might consider that the database schema you have here is
not very good. You're going to have a separate database table for every
course? Why would you do this? A much better option would be to have a table
of courses, with course IDs, and another table with times and dates that
link to a course via a foreign key. If any of this sounds unfamiliar to you
I'd urge you to stop right now and read a book or some web tutorials on SQL
and database design, because not only is the critical knowledge to have as a
developer, it is critical to creating a maintainable database structure for
this application.


On 8/9/07, Zach Firestone <[EMAIL PROTECTED]> wrote:
>
> Hey,
>
> I am trying to output a dynamic variable within a ColdFusion query and
> have hit a wall. I'm creating a golf package website that dynamically pulls
> course names, tee times, and the cost of tee times. In a form on the
> previous page they select the tee time, course they want to play, and date
> they want to play. All these are pulled from a database. Here is my query:
>
>
> 
> 
> 
> 
> SELECT #Time1# FROM #Course1# WHERE Date = '#Date1#'
> 
>
> So the problem I'm having is outputting the price for that time from the
> above query. This is what I would have to do do have it display right:
>
> #Rate1.#Time1##
>
> But ColdFusion throws an error when I do that because it's improper
> syntax. I was hoping someone knew of another way I could call the output
> from the above query. Any insight would be much appreciated.
>
> 

~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285894
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Problem Outputting Dynamic Variable from a Query

2007-08-09 Thread Janet MacKay
Use array notation
#YourQueryName[TheColumnName][RowNumber}#

Though using form variables directly in a sql statement that way poses a sql 
injection risk. 

~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285892
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Problem Outputting Dynamic Variable from a Query

2007-08-09 Thread austen rustrum
Try #rate1["#time1#"]# instead.  I think that should work.

> Hey,
> 
> I am trying to output a dynamic variable within a ColdFusion query and 
> have hit a wall. I'm creating a golf package website that dynamically 
> pulls course names, tee times, and the cost of tee times. In a form on 
> the previous page they select the tee time, course they want to play, 
> and date they want to play. All these are pulled from a database. Here 
> is my query:
> 
> 
> 
> 
>  "-mm-dd")#>
> 
> SELECT #Time1# FROM #Course1# WHERE Date = '#Date1#'
> 
> 
> So the problem I'm having is outputting the price for that time from 
> the above query. This is what I would have to do do have it display 
> right:
> 
> #Rate1.#Time1##
> 
> But ColdFusion throws an error when I do that because it's improper 
> syntax. I was hoping someone knew of another way I could call the 
> output from the above query. Any insight would be much appreciated. 


~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285891
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Problem Outputting Dynamic Variable from a Query

2007-08-09 Thread Zach Firestone
Hey,

I am trying to output a dynamic variable within a ColdFusion query and have hit 
a wall. I'm creating a golf package website that dynamically pulls course 
names, tee times, and the cost of tee times. In a form on the previous page 
they select the tee time, course they want to play, and date they want to play. 
All these are pulled from a database. Here is my query:






SELECT #Time1# FROM #Course1# WHERE Date = '#Date1#'


So the problem I'm having is outputting the price for that time from the above 
query. This is what I would have to do do have it display right:

#Rate1.#Time1##

But ColdFusion throws an error when I do that because it's improper syntax. I 
was hoping someone knew of another way I could call the output from the above 
query. Any insight would be much appreciated. 

~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285888
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Dynamic variable syntax question

2007-01-31 Thread Patrick Farabee
>I think I made that rather confusing.
>
>Output needs to be
>
>Value 1 = Green
>Value 2 - Something else
>
>
>So for database fields "MyField1_a", "MyField2_a", "MyField3_a" ...
>

I think what is confusing people is that you aren't quite clear exactly what 
you are trying to do.  I have a feeling that whatever you are trying to do, you 
will be able to accomplish it by using a dynamic value as a hash key:

If you are working with standard variables, then you can access them using the 
Variables hash.  If it is a value assigned by a URL/FORM, you will need to use 
the URL or FORM hashes instead, but here is an example.







#Variables[letters & "sh"]#


The output will display "Salmon" which is the value of the variable "fish"

Now let's say you wanted "Tyson" to come up.. you CAN'T reference it as you 
might be tempted to:


#Variables[letters & "ght[1]"]#


This will NOT work, because "fight[1]" is not a valid key in the "Variable" 
hash... the actual key is "fight", and it contains an array of two values... so 
you would have to reference it like:


#Variables[letters & "ght"][1]#


So, in essence, you get Variables["fight"][1], which basically is the same as 
just fight[1], but you were able to get the value in an indirect way :)

If you need the entire thing to be dynamic, you could use evaluate:



#Evaluate(letters & "ght"][" & number & "]")#


Though, whenever possible, I would lean away from evaluate and more towards 
something like:




#Variables[letters & "ght"][number]#



If it is a SQL Query, then you are in for a slightly more difficult time.

Query results are very close in implementation to hashes, with each hash value 
containing an array of results, one entry for each query result... for instance:

myQuery.FirstName[1] (contains FirstName value of first query result)
myQuery.FirstName[2] (contains FirstName value of second query result)
myQuery.FirstName[3] (contains FirstName value of third query result)

myQuery.LastName[1] (contains LastName value of first query result)
myQuery.LastName[2] (contains LastName value of second query result)
myQuery.LastName[3] (contains LastName value of third query result)

But, within a query output loop, you can't just say myQuery["LastName"], 
because that ends up being the entire array of those values, which isn't what 
you want.  Fortunately, during the loop, the "currentrow" value will hold the 
correct location of your current data, so you can do something like:



#myQuery[NameType & "Name"][myQuery.currentrow]#


Which would output the FirstName column for each row..

Anyway, hope this helped you some :)

--
Pat

~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268271
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Dynamic variable syntax question

2007-01-31 Thread Judah McAuley
Evaluate is almost never needed. Best CF programming practice 
discourages its use.

Try this:
  
  Value #i# = #MyField["value" & i & "_a"]#
  

Judah

Scott Weikert wrote:
> I think you need:
> 
> 
> Value #i# = #Evaluate("MyField#i#_a")#
> 
> 



~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268233
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Dynamic variable syntax question

2007-01-31 Thread Scott Weikert
I think you need:


Value #i# = #Evaluate("MyField#i#_a")#



~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268227
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Dynamic variable syntax question

2007-01-31 Thread Les Mizzell
I think I made that rather confusing.

Output needs to be

Value 1 = Green
Value 2 - Something else


So for database fields "MyField1_a", "MyField2_a", "MyField3_a" ...


Value #i# = #MyField[i]_a#
  

~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268225
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Dynamic variable syntax question

2007-01-31 Thread Gert Franz
It depends...

If you want to have something in the output like this:

MyVar1 = #value[i]_a
MyVar2 = #value[i]_a
MyVar3 = #value[i]_a
MyVar4 = #value[i]_a
MyVar5 = #value[i]_a
MyVar6 = #value[i]_a
MyVar7 = #value[i]_a
MyVar8 = #value[i]_a

So first of all you forgot the # at the end.

So I guess it was supposed to mean

MyVar#i# = value[#i#]_a


This will output:
MyVar1 = value[1]_a
MyVar2 = value[2]_a
MyVar3 = value[3]_a
MyVar4 = value[4]_a
MyVar5 = value[5]_a
MyVar6 = value[6]_a
MyVar7 = value[7]_a
MyVar8 = value[8]_a

But I guess what you were looking for was something like this:





Regards

Gert

Customer Care
Railo Technologies GmbH
[EMAIL PROTECTED]
www.railo.ch

Join our Mailing List / Treten Sie unserer Mailingliste bei:
deutsch: http://de.groups.yahoo.com/group/railo/
english: http://groups.yahoo.com/group/railo_talk/



Les Mizzell schrieb:
> For MyVar1, MyVar2 - through 8
> And values value1_a, value2_a - through 8
>
> Will this work?
>
> 
> MyVar#i# = #value[i]_a
> 
>
> 

~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268207
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Dynamic variable syntax question

2007-01-31 Thread Teddy Payne


#variables["MyVar#i#"]# = #variables["value#i#_a"]#



This should work.



On 1/31/07, Les Mizzell <[EMAIL PROTECTED]> wrote:
>
> For MyVar1, MyVar2 - through 8
> And values value1_a, value2_a - through 8
>
> Will this work?
>
> 
>MyVar#i# = #value[i]_a
> 
>
> 

~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268206
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Dynamic variable syntax question

2007-01-31 Thread Les Mizzell
> 
> MyVar#i# = #value[i]_a
> 


Whoop - make that...



  MyVar#i# = #value[i]_a#


~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268205
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Dynamic variable syntax question

2007-01-31 Thread Les Mizzell
For MyVar1, MyVar2 - through 8
And values value1_a, value2_a - through 8

Will this work?


MyVar#i# = #value[i]_a


~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268204
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: SQL help - inserting a dynamic variable

2005-04-11 Thread Gareth Arch
You should be able to join as many tables as you like (just as in a regular 
query).  Just select the column names you need

insert into tblthis
(columnone, columntwo, columnthree)
select c.dataone, d.datatwo, e.datathree
from mycolumns c
inner join mycolumnstwo d on (c.my_id = d.my_id)
inner join mycolumnsthree e on (c.my_id = e.my_id)
where c.typename = 'General'

>Oh, so IOW I can only do that for one join table, not more than one? 
>I have a couple of lookup columns that I'll be inserting...
>
>Pete
>
>>

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202213
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: SQL help - inserting a dynamic variable

2005-04-11 Thread Pete Ruckelshaus
Oh, so IOW I can only do that for one join table, not more than one? 
I have a couple of lookup columns that I'll be inserting...

Pete

On Apr 11, 2005 12:54 PM, Gareth Arch <[EMAIL PROTECTED]> wrote:
> You've more or less posted the answer.  The method to use would be:
> 
> INSERT INTO  tblContactAddress(contactID,addressTypeID,address1, etc.)
> SELECT #contactIDValue#, ID, '#address1Value#',etc.
> FROM tblAddressType
> WHERE typename = 'General'
> 
> Just make sure typename = 'General' will only return one value or it will 
> insert those values each time it finds 'General' in tblAddressType (i.e. if 
> you have 3 typename = 'General' it will insert 3 records)
> 
> >I'm making life harder on myself than I need to.  Salient facts:
> >CFMX7, SQL Server 2000
> >
> >I'm trying to insert an address.  The contact address table has the
> >usual fields, i.e. id, contactID, address1, address2, city, state,
> >zip, etc., but it also has an addressTypeID that is a lookup column
> >that references values in an addressType table that has typeid,
> >typename
> >
> >What I _WANT_ to be able to do is something like this:
> >
> >INSERT INTO  tblContactAddress(contactID,addressTypeID,address1, etc.)
> >VALUES  (#contactIDValue#, (SELECT ID FROM tblAddressType WHERE
> >typename = 'General'), '#address1Value#',etc.)
> >
> >Of course, I would be using cfqueryparam for all variables.
> >
> >SQL Server doesn't like this.  Is there a way to accomplish what I'm after?
> >
> >Thanks!
> >
> >Pete
> 
> 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202206
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


  1   2   3   >