RE: Form.FIELDNAME - error!!!!

2002-05-10 Thread Robert Everland

Well when I see your code I can see right off the bat that becuase there are
quotes that you're setting it to a string. I think the pounds are an extra
step, it's easier  for to read, for me it's just as easy to read the quotes.
To each his own.

Robert Everland III
Dixon Ticonderoga
Web Developer Extraordinaire

-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 4:54 PM
To: CF-Talk
Subject: Re: Form.FIELDNAME - error


I understand your point, but it is like saying periods clutter up pages in a
book.

If you have:

cfset variables.my_var = #query.column#
That tells me that there is a variable being set and it is a string

cfset variables.my_var = query.column

Am I setting my variable to the two words seperated by a period,
query.column? or to a variable query.column?

To each his own, but it makes more sense to me to see those pounds on the
right hand side ..  Plus reading a book with periods is easier too :)

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder




 I think that the # on the right side of the set operand is redundant.

 CFSET my_var = #another_var#

 or

 CFSET my_var = another_var

 There is only one thing for *another_var* to be: a variable.  If you
wanted
 my_var to hold the string another_var you should quote the right hand
 side:

 CFSET my_var = another_var

 So my .02 is that pounds just clutter up your statement.

 Reuben Poon


 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 1:35 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error
 Importance: Low


 Tim,

 I wouldn't call that bad practice, It should actually be called good
 practice (at least in my book).  You are setting a variable and the ##
 around the variable show that it is a variable, makes for easier reading.
 Now, ## on the set side would be considered bad practice.

 my .02

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector Commerce Builder


  Not sure if this is an error or just a bad practice, but you don't need
 the
  # signs in your variable declaration (cfset)
 
  CFSET var = ListGetAt(Form.FIELDNAMES, i)
 
  works just fine.  Also you don't need to generate that var at all you
can
  just do a list loop like this:
 
  CFLOOP list=#form.fieldnames# index=formField
  #formField# = #evaluate(formField)#
  CFLOOP
 
  Tim Heald
  ACP/CCFD :)
  Application Development
  www.schoollink.net
 
   -Original Message-
   From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, May 09, 2002 4:16 PM
   To: CF-Talk
   Subject: Form.FIELDNAME - error
  
  
   Hi,
  
Can any one tell me what is the mistake in
  
   CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
   CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
   #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
   BR
   /CFLOOP
  
  
   I am getting the following error:
  
   An error occurred while evaluating the expression:
   #ListLen(FORM.FIELDNAMES)#
  
  
Any help on this is appreciated.
  
   thanks,
   Sudheer Chakka.
  
  
 

 

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-10 Thread Dave Watts

 I wouldn't call that bad practice, It should actually be 
 called good practice (at least in my book). You are setting 
 a variable and the ## around the variable show that it is 
 a variable, makes for easier reading. Now, ## on the set 
 side would be considered bad practice.

The use of pound signs (or hashes, or whatever you like to call them) is
only required when you want to output the value of a variable or an
expression to a string, and in my opinion should only be used in that
specific case. If you're using them for something else, it's unnecessary and
may confuse developers who understand what exactly pound signs do in CF.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-10 Thread Dave Watts

  The speed issue?  About the same difference as cfif vs. 
  cfswitch...
 
 The main reason I would use switch over if is to make it 
 easer to read, and easier to maintain. That it is faster 
 is just a bonus. 

This implies that CFSWITCH is always easier to read and maintain, and always
faster. I wouldn't agree to either of those. There are cases in which it's
easier to read, and other cases in which it isn't. There are cases in which
it's faster, I suppose, and other cases in which it's not. I'd guess that
the key in both cases is the size of your potential case table.

 Thats like saying:
 
 CFSET var1 = this
 CFSET var2 = that
 CFSET var3 = foo
 CFSET var4 = bar
 
 is better than:
 
 CFSCRIPT
   var1 = this;
   var2 = that;
   var3 = foo;
   var4 = bar;
 /CFSCRIPT
 
 or that in this case it wouldn't make the most sense to use:
 
 CFSCRIPT
   var = arrayNew(4);
   var[1] = this;
   var[2] = that;
   var[3] = foo;
   var[4] = bar;
 /CFSCRIPT
 
 The third is both faster and easier to read as far as I am 
 concerned. 

While I agree that, in this case, the last example is probably more sensible
(using an array makes a concrete statement about the relationships between
the values) and thus easier to read, I have no reason to believe it's
faster. Do you have such a reason?

 Now I hear people say that the amount of time you save is 
 so small that it's not even worth worrying about, well the 
 way I see it is if you use ALL the fastest and most optimized 
 code you can, then it will add up, and be noticeable. Even 
 if it is not noticeable to a single user, it can also help
 reduce your processor load on heavy hit sites. When requests 
 are over quicker, more requests can be processed faster and so 
 on. 

The problem with this statement is that you can never use ALL the fastest
and most optimized code, and there are places where your optimization bang
for the buck is almost certainly better spent. In the above example, for
instance, again I have no evidence that it's any faster, or what threshold
is needed to make it faster (for example, it may be faster to declare five
separate variables than an array with five members, but not so for fifty
separate variables vs fifty members, or vice-versa). Very often, when you
see these which is faster debates, there just aren't any meaningful
numbers used to back up these sorts of statements. There's a very good
reason for this - it's hard to determine what those numbers are!

On the other hand, most CF developers would find their time very well spent
if they focused more on optimizing database interactions and limited the
amount of runtime work - the two biggest things that will make a meaningful
difference in application performance. Most developers, even those who think
they have, have not done this. There's a very good reason for this as well -
it's harder than focusing on CF code minutia!

 Also we shouldn't cater coding standards to the beginner, we 
 should train and assist the beginner to the standard.

Standards are nice. The best thing about them is there are so many from
which to choose!

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Reuben Poon

If the page was called directly and not from a form submission you could get
that error because no FORM fields are defined.

Reuben Poon



-Original Message-
From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 1:16 PM
To: CF-Talk
Subject: Form.FIELDNAME - error
Importance: Low


Hi,

 Can any one tell me what is the mistake in

CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
#ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
BR
/CFLOOP


I am getting the following error:

An error occurred while evaluating the expression:
#ListLen(FORM.FIELDNAMES)#


 Any help on this is appreciated.

thanks,
Sudheer Chakka.


__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Jeff Brown

make sure you're in a cfoutput...

v/r,
Jeff

-Original Message-
From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 4:16 PM
To: CF-Talk
Subject: Form.FIELDNAME - error


Hi,

 Can any one tell me what is the mistake in 

CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
#ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
BR
/CFLOOP


I am getting the following error:

An error occurred while evaluating the expression: 
#ListLen(FORM.FIELDNAMES)#


 Any help on this is appreciated.

thanks,
Sudheer Chakka. 


__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Jeff Brown

i take that back, that shouldn't matter.

-Original Message-
From: Jeff Brown [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 4:27 PM
To: CF-Talk
Subject: RE: Form.FIELDNAME - error


make sure you're in a cfoutput...

v/r,
Jeff

-Original Message-
From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 4:16 PM
To: CF-Talk
Subject: Form.FIELDNAME - error


Hi,

 Can any one tell me what is the mistake in 

CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
#ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
BR
/CFLOOP


I am getting the following error:

An error occurred while evaluating the expression: 
#ListLen(FORM.FIELDNAMES)#


 Any help on this is appreciated.

thanks,
Sudheer Chakka. 



__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Timothy Heald

Not sure if this is an error or just a bad practice, but you don't need the
# signs in your variable declaration (cfset)

CFSET var = ListGetAt(Form.FIELDNAMES, i)

works just fine.  Also you don't need to generate that var at all you can
just do a list loop like this:

CFLOOP list=#form.fieldnames# index=formField
#formField# = #evaluate(formField)#
CFLOOP

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

 -Original Message-
 From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 4:16 PM
 To: CF-Talk
 Subject: Form.FIELDNAME - error


 Hi,

  Can any one tell me what is the mistake in

   CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
   CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
   #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
 BR
   /CFLOOP


 I am getting the following error:

 An error occurred while evaluating the expression:
 #ListLen(FORM.FIELDNAMES)#


  Any help on this is appreciated.

 thanks,
 Sudheer Chakka.

 
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Chakka, Sudheer

Hi Reuben,
  
   I am submitting using Post method. I am using FuseBox3. Will that make
a difference??

Thanks, 
Sudheer Chakka
   
-Original Message-
From: Reuben Poon [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 3:24 PM
To: CF-Talk
Subject: RE: Form.FIELDNAME - error


If the page was called directly and not from a form submission you could get
that error because no FORM fields are defined.

Reuben Poon



-Original Message-
From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 1:16 PM
To: CF-Talk
Subject: Form.FIELDNAME - error
Importance: Low


Hi,

 Can any one tell me what is the mistake in

CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
#ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
BR
/CFLOOP


I am getting the following error:

An error occurred while evaluating the expression:
#ListLen(FORM.FIELDNAMES)#


 Any help on this is appreciated.

thanks,
Sudheer Chakka.



__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Form.FIELDNAME - error!!!!

2002-05-09 Thread Paul Giesenhagen

Tim,

I wouldn't call that bad practice, It should actually be called good
practice (at least in my book).  You are setting a variable and the ##
around the variable show that it is a variable, makes for easier reading.
Now, ## on the set side would be considered bad practice.

my .02

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder


 Not sure if this is an error or just a bad practice, but you don't need
the
 # signs in your variable declaration (cfset)

 CFSET var = ListGetAt(Form.FIELDNAMES, i)

 works just fine.  Also you don't need to generate that var at all you can
 just do a list loop like this:

 CFLOOP list=#form.fieldnames# index=formField
 #formField# = #evaluate(formField)#
 CFLOOP

 Tim Heald
 ACP/CCFD :)
 Application Development
 www.schoollink.net

  -Original Message-
  From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 4:16 PM
  To: CF-Talk
  Subject: Form.FIELDNAME - error
 
 
  Hi,
 
   Can any one tell me what is the mistake in
 
  CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
  CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
  #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
  BR
  /CFLOOP
 
 
  I am getting the following error:
 
  An error occurred while evaluating the expression:
  #ListLen(FORM.FIELDNAMES)#
 
 
   Any help on this is appreciated.
 
  thanks,
  Sudheer Chakka.
 
 
 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Timothy Heald

I made a mistake and forgot the scope.  Also you should probably have
something to break it up so you can read it, like this:

CFLOOP list=#form.fieldnames# index=formField
#formField# = #evaluate('form' formField)# br /
CFLOOP

Also someone mentioned that the cfoutput wouldn't matter, well the loop does
need to be contained inside of an output for the server to process that
section of the template and write the variables.

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

 -Original Message-
 From: Timothy Heald [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 4:28 PM
 To: CF-Talk
 Subject: RE: Form.FIELDNAME - error


 Not sure if this is an error or just a bad practice, but you
 don't need the
 # signs in your variable declaration (cfset)

 CFSET var = ListGetAt(Form.FIELDNAMES, i)

 works just fine.  Also you don't need to generate that var at all you can
 just do a list loop like this:

 CFLOOP list=#form.fieldnames# index=formField
   #formField# = #evaluate(formField)#
 CFLOOP

 Tim Heald
 ACP/CCFD :)
 Application Development
 www.schoollink.net

  -Original Message-
  From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 4:16 PM
  To: CF-Talk
  Subject: Form.FIELDNAME - error
 
 
  Hi,
 
   Can any one tell me what is the mistake in
 
  CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
  CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
  #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
  BR
  /CFLOOP
 
 
  I am getting the following error:
 
  An error occurred while evaluating the expression:
  #ListLen(FORM.FIELDNAMES)#
 
 
   Any help on this is appreciated.
 
  thanks,
  Sudheer Chakka.
 
 
 
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Reuben Poon

Sudheer,

No, that should not make a difference.

Do you have debugging turned on?  Look at at the FORM variables in the
debugging info.  Make sure that AT LEAST ONE form variable is passed and it
is listed in the fieldnames variable.

Reuben Poon


-Original Message-
From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 1:28 PM
To: CF-Talk
Subject: RE: Form.FIELDNAME - error
Importance: Low


Hi Reuben,

   I am submitting using Post method. I am using FuseBox3. Will that make
a difference??

Thanks,
Sudheer Chakka

-Original Message-
From: Reuben Poon [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 3:24 PM
To: CF-Talk
Subject: RE: Form.FIELDNAME - error


If the page was called directly and not from a form submission you could get
that error because no FORM fields are defined.

Reuben Poon



-Original Message-
From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 1:16 PM
To: CF-Talk
Subject: Form.FIELDNAME - error
Importance: Low


Hi,

 Can any one tell me what is the mistake in

CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
#ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
BR
/CFLOOP


I am getting the following error:

An error occurred while evaluating the expression:
#ListLen(FORM.FIELDNAMES)#


 Any help on this is appreciated.

thanks,
Sudheer Chakka.




__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Chakka, Sudheer

Hi Tim,
   I checked with that code also. It is giving the same error.

An error occurred while evaluating the expression: 
#form.fieldnames#
Error near line 3, column 17.

Thanks a lot guys for all ur time.
Sudheer Chakka.


-Original Message-
From: Timothy Heald [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 3:28 PM
To: CF-Talk
Subject: RE: Form.FIELDNAME - error


Not sure if this is an error or just a bad practice, but you don't need the
# signs in your variable declaration (cfset)

CFSET var = ListGetAt(Form.FIELDNAMES, i)

works just fine.  Also you don't need to generate that var at all you can
just do a list loop like this:

CFLOOP list=#form.fieldnames# index=formField
#formField# = #evaluate(formField)#
CFLOOP

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

 -Original Message-
 From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 4:16 PM
 To: CF-Talk
 Subject: Form.FIELDNAME - error


 Hi,

  Can any one tell me what is the mistake in

   CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
   CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
   #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
 BR
   /CFLOOP


 I am getting the following error:

 An error occurred while evaluating the expression:
 #ListLen(FORM.FIELDNAMES)#


  Any help on this is appreciated.

 thanks,
 Sudheer Chakka.

 

__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Timothy Heald

As long as you submit the form to that page you are good.  if you try and
run the template directly then you will run into problems.  Using FB 3 will
not cause a problem like this, but it would be best practices to use
attributes scoped variables for this, not form.  The Fb 3 core files will
set all url and form variables into the attributes scope.

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

 -Original Message-
 From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 4:28 PM
 To: CF-Talk
 Subject: RE: Form.FIELDNAME - error


 Hi Reuben,

I am submitting using Post method. I am using FuseBox3. Will
 that make
 a difference??

 Thanks,
 Sudheer Chakka

 -Original Message-
 From: Reuben Poon [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 3:24 PM
 To: CF-Talk
 Subject: RE: Form.FIELDNAME - error


 If the page was called directly and not from a form submission
 you could get
 that error because no FORM fields are defined.

 Reuben Poon



 -Original Message-
 From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 1:16 PM
 To: CF-Talk
 Subject: Form.FIELDNAME - error
 Importance: Low


 Hi,

  Can any one tell me what is the mistake in

   CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
   CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
   #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
 BR
   /CFLOOP


 I am getting the following error:

 An error occurred while evaluating the expression:
 #ListLen(FORM.FIELDNAMES)#


  Any help on this is appreciated.

 thanks,
 Sudheer Chakka.



 
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Reuben Poon

I think that the # on the right side of the set operand is redundant.

CFSET my_var = #another_var#

or

CFSET my_var = another_var

There is only one thing for *another_var* to be: a variable.  If you wanted
my_var to hold the string another_var you should quote the right hand
side:

CFSET my_var = another_var

So my .02 is that pounds just clutter up your statement.

Reuben Poon


-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 1:35 PM
To: CF-Talk
Subject: Re: Form.FIELDNAME - error
Importance: Low


Tim,

I wouldn't call that bad practice, It should actually be called good
practice (at least in my book).  You are setting a variable and the ##
around the variable show that it is a variable, makes for easier reading.
Now, ## on the set side would be considered bad practice.

my .02

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder


 Not sure if this is an error or just a bad practice, but you don't need
the
 # signs in your variable declaration (cfset)

 CFSET var = ListGetAt(Form.FIELDNAMES, i)

 works just fine.  Also you don't need to generate that var at all you can
 just do a list loop like this:

 CFLOOP list=#form.fieldnames# index=formField
 #formField# = #evaluate(formField)#
 CFLOOP

 Tim Heald
 ACP/CCFD :)
 Application Development
 www.schoollink.net

  -Original Message-
  From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 4:16 PM
  To: CF-Talk
  Subject: Form.FIELDNAME - error
 
 
  Hi,
 
   Can any one tell me what is the mistake in
 
  CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
  CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
  #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
  BR
  /CFLOOP
 
 
  I am getting the following error:
 
  An error occurred while evaluating the expression:
  #ListLen(FORM.FIELDNAMES)#
 
 
   Any help on this is appreciated.
 
  thanks,
  Sudheer Chakka.
 
 


__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Form.FIELDNAME - error!!!!

2002-05-09 Thread Paul Giesenhagen

I understand your point, but it is like saying periods clutter up pages in a
book.

If you have:

cfset variables.my_var = #query.column#
That tells me that there is a variable being set and it is a string

cfset variables.my_var = query.column

Am I setting my variable to the two words seperated by a period,
query.column? or to a variable query.column?

To each his own, but it makes more sense to me to see those pounds on the
right hand side ..  Plus reading a book with periods is easier too :)

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder




 I think that the # on the right side of the set operand is redundant.

 CFSET my_var = #another_var#

 or

 CFSET my_var = another_var

 There is only one thing for *another_var* to be: a variable.  If you
wanted
 my_var to hold the string another_var you should quote the right hand
 side:

 CFSET my_var = another_var

 So my .02 is that pounds just clutter up your statement.

 Reuben Poon


 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 1:35 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error
 Importance: Low


 Tim,

 I wouldn't call that bad practice, It should actually be called good
 practice (at least in my book).  You are setting a variable and the ##
 around the variable show that it is a variable, makes for easier reading.
 Now, ## on the set side would be considered bad practice.

 my .02

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector Commerce Builder


  Not sure if this is an error or just a bad practice, but you don't need
 the
  # signs in your variable declaration (cfset)
 
  CFSET var = ListGetAt(Form.FIELDNAMES, i)
 
  works just fine.  Also you don't need to generate that var at all you
can
  just do a list loop like this:
 
  CFLOOP list=#form.fieldnames# index=formField
  #formField# = #evaluate(formField)#
  CFLOOP
 
  Tim Heald
  ACP/CCFD :)
  Application Development
  www.schoollink.net
 
   -Original Message-
   From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, May 09, 2002 4:16 PM
   To: CF-Talk
   Subject: Form.FIELDNAME - error
  
  
   Hi,
  
Can any one tell me what is the mistake in
  
   CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
   CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
   #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
   BR
   /CFLOOP
  
  
   I am getting the following error:
  
   An error occurred while evaluating the expression:
   #ListLen(FORM.FIELDNAMES)#
  
  
Any help on this is appreciated.
  
   thanks,
   Sudheer Chakka.
  
  
 

 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Reuben Poon

I'd like to continue this but I am relatively new to this forum.

Are these types of debates encouraged/discouraged?  Should they be taken
offline?

Reuben Poon



-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 1:54 PM
To: CF-Talk
Subject: Re: Form.FIELDNAME - error
Importance: Low


I understand your point, but it is like saying periods clutter up pages in a
book.

If you have:

cfset variables.my_var = #query.column#
That tells me that there is a variable being set and it is a string

cfset variables.my_var = query.column

Am I setting my variable to the two words seperated by a period,
query.column? or to a variable query.column?

To each his own, but it makes more sense to me to see those pounds on the
right hand side ..  Plus reading a book with periods is easier too :)

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder




 I think that the # on the right side of the set operand is redundant.

 CFSET my_var = #another_var#

 or

 CFSET my_var = another_var

 There is only one thing for *another_var* to be: a variable.  If you
wanted
 my_var to hold the string another_var you should quote the right hand
 side:

 CFSET my_var = another_var

 So my .02 is that pounds just clutter up your statement.

 Reuben Poon


 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 1:35 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error
 Importance: Low


 Tim,

 I wouldn't call that bad practice, It should actually be called good
 practice (at least in my book).  You are setting a variable and the ##
 around the variable show that it is a variable, makes for easier reading.
 Now, ## on the set side would be considered bad practice.

 my .02

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector Commerce Builder


  Not sure if this is an error or just a bad practice, but you don't need
 the
  # signs in your variable declaration (cfset)
 
  CFSET var = ListGetAt(Form.FIELDNAMES, i)
 
  works just fine.  Also you don't need to generate that var at all you
can
  just do a list loop like this:
 
  CFLOOP list=#form.fieldnames# index=formField
  #formField# = #evaluate(formField)#
  CFLOOP
 
  Tim Heald
  ACP/CCFD :)
  Application Development
  www.schoollink.net
 
   -Original Message-
   From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, May 09, 2002 4:16 PM
   To: CF-Talk
   Subject: Form.FIELDNAME - error
  
  
   Hi,
  
Can any one tell me what is the mistake in
  
   CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
   CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
   #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
   BR
   /CFLOOP
  
  
   I am getting the following error:
  
   An error occurred while evaluating the expression:
   #ListLen(FORM.FIELDNAMES)#
  
  
Any help on this is appreciated.
  
   thanks,
   Sudheer Chakka.
  
  
 



__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Form.FIELDNAME - error!!!!

2002-05-09 Thread Douglas Brown

Nope all discussion is encouraged!!! Unless it gets ugly




Douglas Brown
Email: [EMAIL PROTECTED]
- Original Message -
From: Reuben Poon [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, May 09, 2002 2:10 PM
Subject: RE: Form.FIELDNAME - error


 I'd like to continue this but I am relatively new to this forum.

 Are these types of debates encouraged/discouraged?  Should they
be taken
 offline?

 Reuben Poon



 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 1:54 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error
 Importance: Low


 I understand your point, but it is like saying periods clutter
up pages in a
 book.

 If you have:

 cfset variables.my_var = #query.column#
 That tells me that there is a variable being set and it is a
string

 cfset variables.my_var = query.column

 Am I setting my variable to the two words seperated by a period,
 query.column? or to a variable query.column?

 To each his own, but it makes more sense to me to see those
pounds on the
 right hand side ..  Plus reading a book with periods is easier
too :)

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector Commerce Builder




  I think that the # on the right side of the set operand is
redundant.
 
  CFSET my_var = #another_var#
 
  or
 
  CFSET my_var = another_var
 
  There is only one thing for *another_var* to be: a variable.
If you
 wanted
  my_var to hold the string another_var you should quote the
right hand
  side:
 
  CFSET my_var = another_var
 
  So my .02 is that pounds just clutter up your statement.
 
  Reuben Poon
 
 
  -Original Message-
  From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 1:35 PM
  To: CF-Talk
  Subject: Re: Form.FIELDNAME - error
  Importance: Low
 
 
  Tim,
 
  I wouldn't call that bad practice, It should actually be
called good
  practice (at least in my book).  You are setting a variable
and the ##
  around the variable show that it is a variable, makes for
easier reading.
  Now, ## on the set side would be considered bad practice.
 
  my .02
 
  Paul Giesenhagen
  QuillDesign
  http://www.quilldesign.com
  SiteDirector Commerce Builder
 
 
   Not sure if this is an error or just a bad practice, but you
don't need
  the
   # signs in your variable declaration (cfset)
  
   CFSET var = ListGetAt(Form.FIELDNAMES, i)
  
   works just fine.  Also you don't need to generate that var
at all you
 can
   just do a list loop like this:
  
   CFLOOP list=#form.fieldnames# index=formField
   #formField# = #evaluate(formField)#
   CFLOOP
  
   Tim Heald
   ACP/CCFD :)
   Application Development
   www.schoollink.net
  
-Original Message-
From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 4:16 PM
To: CF-Talk
Subject: Form.FIELDNAME - error
   
   
Hi,
   
 Can any one tell me what is the mistake in
   
CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1
INDEX=i
CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
#ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
BR
/CFLOOP
   
   
I am getting the following error:
   
An error occurred while evaluating the expression:
#ListLen(FORM.FIELDNAMES)#
   
   
 Any help on this is appreciated.
   
thanks,
Sudheer Chakka.
   
   
  
 
 



__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Timothy Heald

I think as long as it has something to do with CF and you don't let your
emotions carry you away, that debate is acceptable, but I haven't seen any
cf-talk rules or a faq or anything.

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

 -Original Message-
 From: Reuben Poon [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 5:10 PM
 To: CF-Talk
 Subject: RE: Form.FIELDNAME - error


 I'd like to continue this but I am relatively new to this forum.

 Are these types of debates encouraged/discouraged?  Should they be taken
 offline?

 Reuben Poon



 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 1:54 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error
 Importance: Low


 I understand your point, but it is like saying periods clutter up
 pages in a
 book.

 If you have:

 cfset variables.my_var = #query.column#
 That tells me that there is a variable being set and it is a string

 cfset variables.my_var = query.column

 Am I setting my variable to the two words seperated by a period,
 query.column? or to a variable query.column?

 To each his own, but it makes more sense to me to see those pounds on the
 right hand side ..  Plus reading a book with periods is easier too :)

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector Commerce Builder




  I think that the # on the right side of the set operand is redundant.
 
  CFSET my_var = #another_var#
 
  or
 
  CFSET my_var = another_var
 
  There is only one thing for *another_var* to be: a variable.  If you
 wanted
  my_var to hold the string another_var you should quote the right hand
  side:
 
  CFSET my_var = another_var
 
  So my .02 is that pounds just clutter up your statement.
 
  Reuben Poon
 
 
  -Original Message-
  From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 1:35 PM
  To: CF-Talk
  Subject: Re: Form.FIELDNAME - error
  Importance: Low
 
 
  Tim,
 
  I wouldn't call that bad practice, It should actually be called good
  practice (at least in my book).  You are setting a variable and the ##
  around the variable show that it is a variable, makes for
 easier reading.
  Now, ## on the set side would be considered bad practice.
 
  my .02
 
  Paul Giesenhagen
  QuillDesign
  http://www.quilldesign.com
  SiteDirector Commerce Builder
 
 
   Not sure if this is an error or just a bad practice, but you
 don't need
  the
   # signs in your variable declaration (cfset)
  
   CFSET var = ListGetAt(Form.FIELDNAMES, i)
  
   works just fine.  Also you don't need to generate that var at all you
 can
   just do a list loop like this:
  
   CFLOOP list=#form.fieldnames# index=formField
   #formField# = #evaluate(formField)#
   CFLOOP
  
   Tim Heald
   ACP/CCFD :)
   Application Development
   www.schoollink.net
  
-Original Message-
From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 4:16 PM
To: CF-Talk
Subject: Form.FIELDNAME - error
   
   
Hi,
   
 Can any one tell me what is the mistake in
   
CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
#ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
BR
/CFLOOP
   
   
I am getting the following error:
   
An error occurred while evaluating the expression:
#ListLen(FORM.FIELDNAMES)#
   
   
 Any help on this is appreciated.
   
thanks,
Sudheer Chakka.
   
   
  
 
 

 
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Kevin Schmidt

Extra pound signs are a pet peeve of mine as well.  You don't need them.
If you ask me, adding pound signs is like adding an additional period,
not taking one away.

Kevin


-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 09, 2002 3:54 PM
To: CF-Talk
Subject: Re: Form.FIELDNAME - error

I understand your point, but it is like saying periods clutter up pages
in a
book.

If you have:

cfset variables.my_var = #query.column#
That tells me that there is a variable being set and it is a string

cfset variables.my_var = query.column

Am I setting my variable to the two words seperated by a period,
query.column? or to a variable query.column?

To each his own, but it makes more sense to me to see those pounds on
the
right hand side ..  Plus reading a book with periods is easier too :)

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder




 I think that the # on the right side of the set operand is redundant.

 CFSET my_var = #another_var#

 or

 CFSET my_var = another_var

 There is only one thing for *another_var* to be: a variable.  If you
wanted
 my_var to hold the string another_var you should quote the right
hand
 side:

 CFSET my_var = another_var

 So my .02 is that pounds just clutter up your statement.

 Reuben Poon


 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 1:35 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error
 Importance: Low


 Tim,

 I wouldn't call that bad practice, It should actually be called good
 practice (at least in my book).  You are setting a variable and the ##
 around the variable show that it is a variable, makes for easier
reading.
 Now, ## on the set side would be considered bad practice.

 my .02

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector Commerce Builder


  Not sure if this is an error or just a bad practice, but you don't
need
 the
  # signs in your variable declaration (cfset)
 
  CFSET var = ListGetAt(Form.FIELDNAMES, i)
 
  works just fine.  Also you don't need to generate that var at all
you
can
  just do a list loop like this:
 
  CFLOOP list=#form.fieldnames# index=formField
  #formField# = #evaluate(formField)#
  CFLOOP
 
  Tim Heald
  ACP/CCFD :)
  Application Development
  www.schoollink.net
 
   -Original Message-
   From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, May 09, 2002 4:16 PM
   To: CF-Talk
   Subject: Form.FIELDNAME - error
  
  
   Hi,
  
Can any one tell me what is the mistake in
  
   CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1
INDEX=i
   CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
   #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
   BR
   /CFLOOP
  
  
   I am getting the following error:
  
   An error occurred while evaluating the expression:
   #ListLen(FORM.FIELDNAMES)#
  
  
Any help on this is appreciated.
  
   thanks,
   Sudheer Chakka.
  
  
 

 

__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Form.FIELDNAME - error!!!!

2002-05-09 Thread Paul Giesenhagen

:) they are common ... they get discouraged when the go on and on ...but
usually this group is very informative and you can learn alot by the
debates!

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder



 I'd like to continue this but I am relatively new to this forum.

 Are these types of debates encouraged/discouraged?  Should they be taken
 offline?

 Reuben Poon



 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 1:54 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error
 Importance: Low


 I understand your point, but it is like saying periods clutter up pages in
a
 book.

 If you have:

 cfset variables.my_var = #query.column#
 That tells me that there is a variable being set and it is a string

 cfset variables.my_var = query.column

 Am I setting my variable to the two words seperated by a period,
 query.column? or to a variable query.column?

 To each his own, but it makes more sense to me to see those pounds on the
 right hand side ..  Plus reading a book with periods is easier too :)

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector Commerce Builder




  I think that the # on the right side of the set operand is redundant.
 
  CFSET my_var = #another_var#
 
  or
 
  CFSET my_var = another_var
 
  There is only one thing for *another_var* to be: a variable.  If you
 wanted
  my_var to hold the string another_var you should quote the right hand
  side:
 
  CFSET my_var = another_var
 
  So my .02 is that pounds just clutter up your statement.
 
  Reuben Poon
 
 
  -Original Message-
  From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 1:35 PM
  To: CF-Talk
  Subject: Re: Form.FIELDNAME - error
  Importance: Low
 
 
  Tim,
 
  I wouldn't call that bad practice, It should actually be called good
  practice (at least in my book).  You are setting a variable and the ##
  around the variable show that it is a variable, makes for easier
reading.
  Now, ## on the set side would be considered bad practice.
 
  my .02
 
  Paul Giesenhagen
  QuillDesign
  http://www.quilldesign.com
  SiteDirector Commerce Builder
 
 
   Not sure if this is an error or just a bad practice, but you don't
need
  the
   # signs in your variable declaration (cfset)
  
   CFSET var = ListGetAt(Form.FIELDNAMES, i)
  
   works just fine.  Also you don't need to generate that var at all you
 can
   just do a list loop like this:
  
   CFLOOP list=#form.fieldnames# index=formField
   #formField# = #evaluate(formField)#
   CFLOOP
  
   Tim Heald
   ACP/CCFD :)
   Application Development
   www.schoollink.net
  
-Original Message-
From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 4:16 PM
To: CF-Talk
Subject: Form.FIELDNAME - error
   
   
Hi,
   
 Can any one tell me what is the mistake in
   
CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
#ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
BR
/CFLOOP
   
   
I am getting the following error:
   
An error occurred while evaluating the expression:
#ListLen(FORM.FIELDNAMES)#
   
   
 Any help on this is appreciated.
   
thanks,
Sudheer Chakka.
   
   
  
 
 

 
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Form.FIELDNAME - error!!!!

2002-05-09 Thread Kevin Miller

Regardless of what everyone thinks, it's slower to include the pounds because CF then 
has to enumerate the variable's value rather than just referring to the variable 
itself.

Kevin

 [EMAIL PROTECTED] 05/09/02 01:53PM 
I understand your point, but it is like saying periods clutter up pages in a
book.

If you have:

cfset variables.my_var = #query.column#
That tells me that there is a variable being set and it is a string

cfset variables.my_var = query.column

Am I setting my variable to the two words seperated by a period,
query.column? or to a variable query.column?

To each his own, but it makes more sense to me to see those pounds on the
right hand side ..  Plus reading a book with periods is easier too :)

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com 
SiteDirector Commerce Builder




 I think that the # on the right side of the set operand is redundant.

 CFSET my_var = #another_var#

 or

 CFSET my_var = another_var

 There is only one thing for *another_var* to be: a variable.  If you
wanted
 my_var to hold the string another_var you should quote the right hand
 side:

 CFSET my_var = another_var

 So my .02 is that pounds just clutter up your statement.

 Reuben Poon


 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, May 09, 2002 1:35 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error
 Importance: Low


 Tim,

 I wouldn't call that bad practice, It should actually be called good
 practice (at least in my book).  You are setting a variable and the ##
 around the variable show that it is a variable, makes for easier reading.
 Now, ## on the set side would be considered bad practice.

 my .02

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com 
 SiteDirector Commerce Builder


  Not sure if this is an error or just a bad practice, but you don't need
 the
  # signs in your variable declaration (cfset)
 
  CFSET var = ListGetAt(Form.FIELDNAMES, i)
 
  works just fine.  Also you don't need to generate that var at all you
can
  just do a list loop like this:
 
  CFLOOP list=#form.fieldnames# index=formField
  #formField# = #evaluate(formField)#
  CFLOOP
 
  Tim Heald
  ACP/CCFD :)
  Application Development
  www.schoollink.net 
 
   -Original Message-
   From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]] 
   Sent: Thursday, May 09, 2002 4:16 PM
   To: CF-Talk
   Subject: Form.FIELDNAME - error
  
  
   Hi,
  
Can any one tell me what is the mistake in
  
   CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
   CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
   #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
   BR
   /CFLOOP
  
  
   I am getting the following error:
  
   An error occurred while evaluating the expression:
   #ListLen(FORM.FIELDNAMES)#
  
  
Any help on this is appreciated.
  
   thanks,
   Sudheer Chakka.
  
  
 

 

__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Chakka, Sudheer

Hi,

   That didn't solve my problem. It is not even recognising the
Form.FieldNames 

CFLOOP list=#form.fieldnames# index=formField
#formField# = #evaluate('form' formField)# br /
/CFLOOP

it is giving error in the first line of the above code.

Any more suggestions.

Thanks,
Sudheer Chakka.

-Original Message-
From: Reuben Poon [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 3:44 PM
To: CF-Talk
Subject: RE: Form.FIELDNAME - error


I think that the # on the right side of the set operand is redundant.

CFSET my_var = #another_var#

or

CFSET my_var = another_var

There is only one thing for *another_var* to be: a variable.  If you wanted
my_var to hold the string another_var you should quote the right hand
side:

CFSET my_var = another_var

So my .02 is that pounds just clutter up your statement.

Reuben Poon


-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 1:35 PM
To: CF-Talk
Subject: Re: Form.FIELDNAME - error
Importance: Low


Tim,

I wouldn't call that bad practice, It should actually be called good
practice (at least in my book).  You are setting a variable and the ##
around the variable show that it is a variable, makes for easier reading.
Now, ## on the set side would be considered bad practice.

my .02

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder


 Not sure if this is an error or just a bad practice, but you don't need
the
 # signs in your variable declaration (cfset)

 CFSET var = ListGetAt(Form.FIELDNAMES, i)

 works just fine.  Also you don't need to generate that var at all you can
 just do a list loop like this:

 CFLOOP list=#form.fieldnames# index=formField
 #formField# = #evaluate(formField)#
 CFLOOP

 Tim Heald
 ACP/CCFD :)
 Application Development
 www.schoollink.net

  -Original Message-
  From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 4:16 PM
  To: CF-Talk
  Subject: Form.FIELDNAME - error
 
 
  Hi,
 
   Can any one tell me what is the mistake in
 
  CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
  CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
  #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
  BR
  /CFLOOP
 
 
  I am getting the following error:
 
  An error occurred while evaluating the expression:
  #ListLen(FORM.FIELDNAMES)#
 
 
   Any help on this is appreciated.
 
  thanks,
  Sudheer Chakka.
 
 



__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Chakka, Sudheer

Well Guys,
  
   I am Sorry!! It is weird that i closed all my opened IE Browser windows
and reopened, it 
   
   worked. the same code worked !!! 
  
   Tim your code is working !! - thanks.

   Guys, Thanks for all of ur patience.

Special Thanks to Tim, Reuben , Paul  and everyone who participated in this
discussion.

Sudheer Chakka.
  



-Original Message-
From: Timothy Heald [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 4:15 PM
To: CF-Talk
Subject: RE: Form.FIELDNAME - error


I think as long as it has something to do with CF and you don't let your
emotions carry you away, that debate is acceptable, but I haven't seen any
cf-talk rules or a faq or anything.

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

 -Original Message-
 From: Reuben Poon [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 5:10 PM
 To: CF-Talk
 Subject: RE: Form.FIELDNAME - error


 I'd like to continue this but I am relatively new to this forum.

 Are these types of debates encouraged/discouraged?  Should they be taken
 offline?

 Reuben Poon



 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 1:54 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error
 Importance: Low


 I understand your point, but it is like saying periods clutter up
 pages in a
 book.

 If you have:

 cfset variables.my_var = #query.column#
 That tells me that there is a variable being set and it is a string

 cfset variables.my_var = query.column

 Am I setting my variable to the two words seperated by a period,
 query.column? or to a variable query.column?

 To each his own, but it makes more sense to me to see those pounds on the
 right hand side ..  Plus reading a book with periods is easier too :)

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector Commerce Builder




  I think that the # on the right side of the set operand is redundant.
 
  CFSET my_var = #another_var#
 
  or
 
  CFSET my_var = another_var
 
  There is only one thing for *another_var* to be: a variable.  If you
 wanted
  my_var to hold the string another_var you should quote the right hand
  side:
 
  CFSET my_var = another_var
 
  So my .02 is that pounds just clutter up your statement.
 
  Reuben Poon
 
 
  -Original Message-
  From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 1:35 PM
  To: CF-Talk
  Subject: Re: Form.FIELDNAME - error
  Importance: Low
 
 
  Tim,
 
  I wouldn't call that bad practice, It should actually be called good
  practice (at least in my book).  You are setting a variable and the ##
  around the variable show that it is a variable, makes for
 easier reading.
  Now, ## on the set side would be considered bad practice.
 
  my .02
 
  Paul Giesenhagen
  QuillDesign
  http://www.quilldesign.com
  SiteDirector Commerce Builder
 
 
   Not sure if this is an error or just a bad practice, but you
 don't need
  the
   # signs in your variable declaration (cfset)
  
   CFSET var = ListGetAt(Form.FIELDNAMES, i)
  
   works just fine.  Also you don't need to generate that var at all you
 can
   just do a list loop like this:
  
   CFLOOP list=#form.fieldnames# index=formField
   #formField# = #evaluate(formField)#
   CFLOOP
  
   Tim Heald
   ACP/CCFD :)
   Application Development
   www.schoollink.net
  
-Original Message-
From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 4:16 PM
To: CF-Talk
Subject: Form.FIELDNAME - error
   
   
Hi,
   
 Can any one tell me what is the mistake in
   
CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
#ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
BR
/CFLOOP
   
   
I am getting the following error:
   
An error occurred while evaluating the expression:
#ListLen(FORM.FIELDNAMES)#
   
   
 Any help on this is appreciated.
   
thanks,
Sudheer Chakka.
   
   
  
 
 

 

__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Timothy Heald

Have we found out what the source of the original error is yet?  I love a
good debate, but I would really like to help out the person who started this
thread as well.

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 5:20 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error


 :) they are common ... they get discouraged when the go on and on ...but
 usually this group is very informative and you can learn alot by the
 debates!

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector Commerce Builder



  I'd like to continue this but I am relatively new to this forum.
 
  Are these types of debates encouraged/discouraged?  Should they be taken
  offline?
 
  Reuben Poon
 
 
 
  -Original Message-
  From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 1:54 PM
  To: CF-Talk
  Subject: Re: Form.FIELDNAME - error
  Importance: Low
 
 
  I understand your point, but it is like saying periods clutter
 up pages in
 a
  book.
 
  If you have:
 
  cfset variables.my_var = #query.column#
  That tells me that there is a variable being set and it is a string
 
  cfset variables.my_var = query.column
 
  Am I setting my variable to the two words seperated by a period,
  query.column? or to a variable query.column?
 
  To each his own, but it makes more sense to me to see those
 pounds on the
  right hand side ..  Plus reading a book with periods is easier too :)
 
  Paul Giesenhagen
  QuillDesign
  http://www.quilldesign.com
  SiteDirector Commerce Builder
 
 
 
 
   I think that the # on the right side of the set operand is redundant.
  
   CFSET my_var = #another_var#
  
   or
  
   CFSET my_var = another_var
  
   There is only one thing for *another_var* to be: a variable.  If you
  wanted
   my_var to hold the string another_var you should quote the
 right hand
   side:
  
   CFSET my_var = another_var
  
   So my .02 is that pounds just clutter up your statement.
  
   Reuben Poon
  
  
   -Original Message-
   From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, May 09, 2002 1:35 PM
   To: CF-Talk
   Subject: Re: Form.FIELDNAME - error
   Importance: Low
  
  
   Tim,
  
   I wouldn't call that bad practice, It should actually be called good
   practice (at least in my book).  You are setting a variable and the ##
   around the variable show that it is a variable, makes for easier
 reading.
   Now, ## on the set side would be considered bad practice.
  
   my .02
  
   Paul Giesenhagen
   QuillDesign
   http://www.quilldesign.com
   SiteDirector Commerce Builder
  
  
Not sure if this is an error or just a bad practice, but you don't
 need
   the
# signs in your variable declaration (cfset)
   
CFSET var = ListGetAt(Form.FIELDNAMES, i)
   
works just fine.  Also you don't need to generate that var
 at all you
  can
just do a list loop like this:
   
CFLOOP list=#form.fieldnames# index=formField
#formField# = #evaluate(formField)#
CFLOOP
   
Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net
   
 -Original Message-
 From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 4:16 PM
 To: CF-Talk
 Subject: Form.FIELDNAME - error


 Hi,

  Can any one tell me what is the mistake in

 CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1
 INDEX=i
 CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
 #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
 BR
 /CFLOOP


 I am getting the following error:

 An error occurred while evaluating the expression:
 #ListLen(FORM.FIELDNAMES)#


  Any help on this is appreciated.

 thanks,
 Sudheer Chakka.


   
  
  
 
 
 
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Chakka, Sudheer

Hi Tim,

   I appreciate u r concern and U will be happy to know that i could solve
the problem by 

   closing all the opened IE browser windows and opened it and the same code
is working.

 thanks for u r offer to help.

Sudheer Chakka.

-Original Message-
From: Timothy Heald [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 4:25 PM
To: CF-Talk
Subject: RE: Form.FIELDNAME - error


Have we found out what the source of the original error is yet?  I love a
good debate, but I would really like to help out the person who started this
thread as well.

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 5:20 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error


 :) they are common ... they get discouraged when the go on and on ...but
 usually this group is very informative and you can learn alot by the
 debates!

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector Commerce Builder



  I'd like to continue this but I am relatively new to this forum.
 
  Are these types of debates encouraged/discouraged?  Should they be taken
  offline?
 
  Reuben Poon
 
 
 
  -Original Message-
  From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 1:54 PM
  To: CF-Talk
  Subject: Re: Form.FIELDNAME - error
  Importance: Low
 
 
  I understand your point, but it is like saying periods clutter
 up pages in
 a
  book.
 
  If you have:
 
  cfset variables.my_var = #query.column#
  That tells me that there is a variable being set and it is a string
 
  cfset variables.my_var = query.column
 
  Am I setting my variable to the two words seperated by a period,
  query.column? or to a variable query.column?
 
  To each his own, but it makes more sense to me to see those
 pounds on the
  right hand side ..  Plus reading a book with periods is easier too :)
 
  Paul Giesenhagen
  QuillDesign
  http://www.quilldesign.com
  SiteDirector Commerce Builder
 
 
 
 
   I think that the # on the right side of the set operand is redundant.
  
   CFSET my_var = #another_var#
  
   or
  
   CFSET my_var = another_var
  
   There is only one thing for *another_var* to be: a variable.  If you
  wanted
   my_var to hold the string another_var you should quote the
 right hand
   side:
  
   CFSET my_var = another_var
  
   So my .02 is that pounds just clutter up your statement.
  
   Reuben Poon
  
  
   -Original Message-
   From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, May 09, 2002 1:35 PM
   To: CF-Talk
   Subject: Re: Form.FIELDNAME - error
   Importance: Low
  
  
   Tim,
  
   I wouldn't call that bad practice, It should actually be called good
   practice (at least in my book).  You are setting a variable and the ##
   around the variable show that it is a variable, makes for easier
 reading.
   Now, ## on the set side would be considered bad practice.
  
   my .02
  
   Paul Giesenhagen
   QuillDesign
   http://www.quilldesign.com
   SiteDirector Commerce Builder
  
  
Not sure if this is an error or just a bad practice, but you don't
 need
   the
# signs in your variable declaration (cfset)
   
CFSET var = ListGetAt(Form.FIELDNAMES, i)
   
works just fine.  Also you don't need to generate that var
 at all you
  can
just do a list loop like this:
   
CFLOOP list=#form.fieldnames# index=formField
#formField# = #evaluate(formField)#
CFLOOP
   
Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net
   
 -Original Message-
 From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 4:16 PM
 To: CF-Talk
 Subject: Form.FIELDNAME - error


 Hi,

  Can any one tell me what is the mistake in

 CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1
 INDEX=i
 CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
 #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
 BR
 /CFLOOP


 I am getting the following error:

 An error occurred while evaluating the expression:
 #ListLen(FORM.FIELDNAMES)#


  Any help on this is appreciated.

 thanks,
 Sudheer Chakka.


   
  
  
 
 
 

__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Timothy Heald

The cache monster strikes again :)

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

 -Original Message-
 From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 5:18 PM
 To: CF-Talk
 Subject: RE: Form.FIELDNAME - error


 Well Guys,

I am Sorry!! It is weird that i closed all my opened IE Browser windows
 and reopened, it

worked. the same code worked !!!

Tim your code is working !! - thanks.

Guys, Thanks for all of ur patience.

 Special Thanks to Tim, Reuben , Paul  and everyone who
 participated in this
 discussion.

 Sudheer Chakka.




 -Original Message-
 From: Timothy Heald [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 4:15 PM
 To: CF-Talk
 Subject: RE: Form.FIELDNAME - error


 I think as long as it has something to do with CF and you don't let your
 emotions carry you away, that debate is acceptable, but I haven't seen any
 cf-talk rules or a faq or anything.

 Tim Heald
 ACP/CCFD :)
 Application Development
 www.schoollink.net

  -Original Message-
  From: Reuben Poon [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 5:10 PM
  To: CF-Talk
  Subject: RE: Form.FIELDNAME - error
 
 
  I'd like to continue this but I am relatively new to this forum.
 
  Are these types of debates encouraged/discouraged?  Should they be taken
  offline?
 
  Reuben Poon
 
 
 
  -Original Message-
  From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 1:54 PM
  To: CF-Talk
  Subject: Re: Form.FIELDNAME - error
  Importance: Low
 
 
  I understand your point, but it is like saying periods clutter up
  pages in a
  book.
 
  If you have:
 
  cfset variables.my_var = #query.column#
  That tells me that there is a variable being set and it is a string
 
  cfset variables.my_var = query.column
 
  Am I setting my variable to the two words seperated by a period,
  query.column? or to a variable query.column?
 
  To each his own, but it makes more sense to me to see those
 pounds on the
  right hand side ..  Plus reading a book with periods is easier too :)
 
  Paul Giesenhagen
  QuillDesign
  http://www.quilldesign.com
  SiteDirector Commerce Builder
 
 
 
 
   I think that the # on the right side of the set operand is redundant.
  
   CFSET my_var = #another_var#
  
   or
  
   CFSET my_var = another_var
  
   There is only one thing for *another_var* to be: a variable.  If you
  wanted
   my_var to hold the string another_var you should quote the
 right hand
   side:
  
   CFSET my_var = another_var
  
   So my .02 is that pounds just clutter up your statement.
  
   Reuben Poon
  
  
   -Original Message-
   From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, May 09, 2002 1:35 PM
   To: CF-Talk
   Subject: Re: Form.FIELDNAME - error
   Importance: Low
  
  
   Tim,
  
   I wouldn't call that bad practice, It should actually be called good
   practice (at least in my book).  You are setting a variable and the ##
   around the variable show that it is a variable, makes for
  easier reading.
   Now, ## on the set side would be considered bad practice.
  
   my .02
  
   Paul Giesenhagen
   QuillDesign
   http://www.quilldesign.com
   SiteDirector Commerce Builder
  
  
Not sure if this is an error or just a bad practice, but you
  don't need
   the
# signs in your variable declaration (cfset)
   
CFSET var = ListGetAt(Form.FIELDNAMES, i)
   
works just fine.  Also you don't need to generate that var
 at all you
  can
just do a list loop like this:
   
CFLOOP list=#form.fieldnames# index=formField
#formField# = #evaluate(formField)#
CFLOOP
   
Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net
   
 -Original Message-
 From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 4:16 PM
 To: CF-Talk
 Subject: Form.FIELDNAME - error


 Hi,

  Can any one tell me what is the mistake in

 CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1
 INDEX=i
 CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
 #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
 BR
 /CFLOOP


 I am getting the following error:

 An error occurred while evaluating the expression:
 #ListLen(FORM.FIELDNAMES)#


  Any help on this is appreciated.

 thanks,
 Sudheer Chakka.


   
  
  
 
 

 
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Chakka, Sudheer

Hi Tim,

U know that is cache, bacuse I tried submitting the form for another
form which is completely new for that session of IE and that form also
didn't send the form variables.

It is kinda of bug in IE... may be I will look into more the next time
if it happens!!

Thanks,
Sudheer Chakka.

 

-Original Message-
From: Timothy Heald [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 4:31 PM
To: CF-Talk
Subject: RE: Form.FIELDNAME - error


The cache monster strikes again :)

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

 -Original Message-
 From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 5:18 PM
 To: CF-Talk
 Subject: RE: Form.FIELDNAME - error


 Well Guys,

I am Sorry!! It is weird that i closed all my opened IE Browser windows
 and reopened, it

worked. the same code worked !!!

Tim your code is working !! - thanks.

Guys, Thanks for all of ur patience.

 Special Thanks to Tim, Reuben , Paul  and everyone who
 participated in this
 discussion.

 Sudheer Chakka.




 -Original Message-
 From: Timothy Heald [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 4:15 PM
 To: CF-Talk
 Subject: RE: Form.FIELDNAME - error


 I think as long as it has something to do with CF and you don't let your
 emotions carry you away, that debate is acceptable, but I haven't seen any
 cf-talk rules or a faq or anything.

 Tim Heald
 ACP/CCFD :)
 Application Development
 www.schoollink.net

  -Original Message-
  From: Reuben Poon [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 5:10 PM
  To: CF-Talk
  Subject: RE: Form.FIELDNAME - error
 
 
  I'd like to continue this but I am relatively new to this forum.
 
  Are these types of debates encouraged/discouraged?  Should they be taken
  offline?
 
  Reuben Poon
 
 
 
  -Original Message-
  From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 1:54 PM
  To: CF-Talk
  Subject: Re: Form.FIELDNAME - error
  Importance: Low
 
 
  I understand your point, but it is like saying periods clutter up
  pages in a
  book.
 
  If you have:
 
  cfset variables.my_var = #query.column#
  That tells me that there is a variable being set and it is a string
 
  cfset variables.my_var = query.column
 
  Am I setting my variable to the two words seperated by a period,
  query.column? or to a variable query.column?
 
  To each his own, but it makes more sense to me to see those
 pounds on the
  right hand side ..  Plus reading a book with periods is easier too :)
 
  Paul Giesenhagen
  QuillDesign
  http://www.quilldesign.com
  SiteDirector Commerce Builder
 
 
 
 
   I think that the # on the right side of the set operand is redundant.
  
   CFSET my_var = #another_var#
  
   or
  
   CFSET my_var = another_var
  
   There is only one thing for *another_var* to be: a variable.  If you
  wanted
   my_var to hold the string another_var you should quote the
 right hand
   side:
  
   CFSET my_var = another_var
  
   So my .02 is that pounds just clutter up your statement.
  
   Reuben Poon
  
  
   -Original Message-
   From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, May 09, 2002 1:35 PM
   To: CF-Talk
   Subject: Re: Form.FIELDNAME - error
   Importance: Low
  
  
   Tim,
  
   I wouldn't call that bad practice, It should actually be called good
   practice (at least in my book).  You are setting a variable and the ##
   around the variable show that it is a variable, makes for
  easier reading.
   Now, ## on the set side would be considered bad practice.
  
   my .02
  
   Paul Giesenhagen
   QuillDesign
   http://www.quilldesign.com
   SiteDirector Commerce Builder
  
  
Not sure if this is an error or just a bad practice, but you
  don't need
   the
# signs in your variable declaration (cfset)
   
CFSET var = ListGetAt(Form.FIELDNAMES, i)
   
works just fine.  Also you don't need to generate that var
 at all you
  can
just do a list loop like this:
   
CFLOOP list=#form.fieldnames# index=formField
#formField# = #evaluate(formField)#
CFLOOP
   
Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net
   
 -Original Message-
 From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 4:16 PM
 To: CF-Talk
 Subject: Form.FIELDNAME - error


 Hi,

  Can any one tell me what is the mistake in

 CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1
 INDEX=i
 CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
 #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
 BR
 /CFLOOP


 I am getting the following error:

 An error occurred while evaluating the expression:
 #ListLen(FORM.FIELDNAMES)#


  Any help on this is appreciated.

 thanks,
 Sudheer Chakka

RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Craig Thomas


cfset variables.my_var = query.column

Am I setting my variable to the two words seperated by a period,
query.column? or to a variable query.column?


The first.  If you wanted to set myVar to a variable query.column, don't use
quotes.  (Either way, the period should be a _ or some such.)


SO,

cfset variables.myVar = query_column
myVar = the string query_column

cfset variables.myVar = query_column
sets the variable variables.myVar to some other variable, namely,
query_column if it exists and throws an error if it doesn't.

-Craig Thomas


__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Form.FIELDNAME - error!!!!

2002-05-09 Thread Matthew Walker

I vote for Reuben on this. I disagree with your argument. While you want
periods in a book. You. Don't. Want. Too. Many. Of. Them. People new to CF
often over use pound signs. So we are encouraged to learn when they're not
needed and then not use them. Thus Reuben's and my preference for not using
them when not needed. That doesn't mean it's the only right way, but it
certainly is one of them.

I don't understand your example: cfset variables.my_var = query.column
It's obvious that you're setting your variable to the two words separated by
a period.

I also write things like cfif MyQuery.RecordCount and I think this is
easier to read (for me anyway) than cfif MyQuery.RecordCount GT 0.

Matt

- Original Message -
From: Paul Giesenhagen [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, May 10, 2002 8:53 AM
Subject: Re: Form.FIELDNAME - error


 I understand your point, but it is like saying periods clutter up pages in
a
 book.

 If you have:

 cfset variables.my_var = #query.column#
 That tells me that there is a variable being set and it is a string

 cfset variables.my_var = query.column

 Am I setting my variable to the two words seperated by a period,
 query.column? or to a variable query.column?

 To each his own, but it makes more sense to me to see those pounds on the
 right hand side ..  Plus reading a book with periods is easier too :)

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector Commerce Builder




  I think that the # on the right side of the set operand is redundant.
 
  CFSET my_var = #another_var#
 
  or
 
  CFSET my_var = another_var
 
  There is only one thing for *another_var* to be: a variable.  If you
 wanted
  my_var to hold the string another_var you should quote the right hand
  side:
 
  CFSET my_var = another_var
 
  So my .02 is that pounds just clutter up your statement.
 
  Reuben Poon
 
 
  -Original Message-
  From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 1:35 PM
  To: CF-Talk
  Subject: Re: Form.FIELDNAME - error
  Importance: Low
 
 
  Tim,
 
  I wouldn't call that bad practice, It should actually be called good
  practice (at least in my book).  You are setting a variable and the ##
  around the variable show that it is a variable, makes for easier
reading.
  Now, ## on the set side would be considered bad practice.
 
  my .02
 
  Paul Giesenhagen
  QuillDesign
  http://www.quilldesign.com
  SiteDirector Commerce Builder
 
 
   Not sure if this is an error or just a bad practice, but you don't
need
  the
   # signs in your variable declaration (cfset)
  
   CFSET var = ListGetAt(Form.FIELDNAMES, i)
  
   works just fine.  Also you don't need to generate that var at all you
 can
   just do a list loop like this:
  
   CFLOOP list=#form.fieldnames# index=formField
   #formField# = #evaluate(formField)#
   CFLOOP
  
   Tim Heald
   ACP/CCFD :)
   Application Development
   www.schoollink.net
  
-Original Message-
From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 4:16 PM
To: CF-Talk
Subject: Form.FIELDNAME - error
   
   
Hi,
   
 Can any one tell me what is the mistake in
   
CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1 INDEX=i
CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
#ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
BR
/CFLOOP
   
   
I am getting the following error:
   
An error occurred while evaluating the expression:
#ListLen(FORM.FIELDNAMES)#
   
   
 Any help on this is appreciated.
   
thanks,
Sudheer Chakka.
   
   
  
 
 
 
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Reuben Poon

Sudheer,

For future reference.  The caching problem created an error probably because
the FORM variables were not defined.

Reuben


-Original Message-
From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 2:25 PM
To: CF-Talk
Subject: RE: Form.FIELDNAME - error
Importance: Low


Hi Tim,

   I appreciate u r concern and U will be happy to know that i could solve
the problem by

   closing all the opened IE browser windows and opened it and the same code
is working.

 thanks for u r offer to help.

Sudheer Chakka.

-Original Message-
From: Timothy Heald [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 4:25 PM
To: CF-Talk
Subject: RE: Form.FIELDNAME - error


Have we found out what the source of the original error is yet?  I love a
good debate, but I would really like to help out the person who started this
thread as well.

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 5:20 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error


 :) they are common ... they get discouraged when the go on and on ...but
 usually this group is very informative and you can learn alot by the
 debates!

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector Commerce Builder



  I'd like to continue this but I am relatively new to this forum.
 
  Are these types of debates encouraged/discouraged?  Should they be taken
  offline?
 
  Reuben Poon
 
 
 
  -Original Message-
  From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 1:54 PM
  To: CF-Talk
  Subject: Re: Form.FIELDNAME - error
  Importance: Low
 
 
  I understand your point, but it is like saying periods clutter
 up pages in
 a
  book.
 
  If you have:
 
  cfset variables.my_var = #query.column#
  That tells me that there is a variable being set and it is a string
 
  cfset variables.my_var = query.column
 
  Am I setting my variable to the two words seperated by a period,
  query.column? or to a variable query.column?
 
  To each his own, but it makes more sense to me to see those
 pounds on the
  right hand side ..  Plus reading a book with periods is easier too :)
 
  Paul Giesenhagen
  QuillDesign
  http://www.quilldesign.com
  SiteDirector Commerce Builder
 
 
 
 
   I think that the # on the right side of the set operand is redundant.
  
   CFSET my_var = #another_var#
  
   or
  
   CFSET my_var = another_var
  
   There is only one thing for *another_var* to be: a variable.  If you
  wanted
   my_var to hold the string another_var you should quote the
 right hand
   side:
  
   CFSET my_var = another_var
  
   So my .02 is that pounds just clutter up your statement.
  
   Reuben Poon
  
  
   -Original Message-
   From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, May 09, 2002 1:35 PM
   To: CF-Talk
   Subject: Re: Form.FIELDNAME - error
   Importance: Low
  
  
   Tim,
  
   I wouldn't call that bad practice, It should actually be called good
   practice (at least in my book).  You are setting a variable and the ##
   around the variable show that it is a variable, makes for easier
 reading.
   Now, ## on the set side would be considered bad practice.
  
   my .02
  
   Paul Giesenhagen
   QuillDesign
   http://www.quilldesign.com
   SiteDirector Commerce Builder
  
  
Not sure if this is an error or just a bad practice, but you don't
 need
   the
# signs in your variable declaration (cfset)
   
CFSET var = ListGetAt(Form.FIELDNAMES, i)
   
works just fine.  Also you don't need to generate that var
 at all you
  can
just do a list loop like this:
   
CFLOOP list=#form.fieldnames# index=formField
#formField# = #evaluate(formField)#
CFLOOP
   
Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net
   
 -Original Message-
 From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 4:16 PM
 To: CF-Talk
 Subject: Form.FIELDNAME - error


 Hi,

  Can any one tell me what is the mistake in

 CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1
 INDEX=i
 CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
 #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
 BR
 /CFLOOP


 I am getting the following error:

 An error occurred while evaluating the expression:
 #ListLen(FORM.FIELDNAMES)#


  Any help on this is appreciated.

 thanks,
 Sudheer Chakka.


   
  
  
 
 



__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com

RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Timothy Heald

I agree.  Plus why type the extra characters.  I know on the Fb list every
so often someone will voice the wish that instead of cfoutput you could
just use cfo  I think that would be great :)

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

 -Original Message-
 From: Matthew Walker [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 5:03 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error


 I vote for Reuben on this. I disagree with your argument. While you want
 periods in a book. You. Don't. Want. Too. Many. Of. Them. People new to CF
 often over use pound signs. So we are encouraged to learn when they're not
 needed and then not use them. Thus Reuben's and my preference for
 not using
 them when not needed. That doesn't mean it's the only right way, but it
 certainly is one of them.

 I don't understand your example: cfset variables.my_var = query.column
 It's obvious that you're setting your variable to the two words
 separated by
 a period.

 I also write things like cfif MyQuery.RecordCount and I think this is
 easier to read (for me anyway) than cfif MyQuery.RecordCount GT 0.

 Matt

 - Original Message -
 From: Paul Giesenhagen [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Friday, May 10, 2002 8:53 AM
 Subject: Re: Form.FIELDNAME - error


  I understand your point, but it is like saying periods clutter
 up pages in
 a
  book.
 
  If you have:
 
  cfset variables.my_var = #query.column#
  That tells me that there is a variable being set and it is a string
 
  cfset variables.my_var = query.column
 
  Am I setting my variable to the two words seperated by a period,
  query.column? or to a variable query.column?
 
  To each his own, but it makes more sense to me to see those
 pounds on the
  right hand side ..  Plus reading a book with periods is easier too :)
 
  Paul Giesenhagen
  QuillDesign
  http://www.quilldesign.com
  SiteDirector Commerce Builder
 
 
 
 
   I think that the # on the right side of the set operand is redundant.
  
   CFSET my_var = #another_var#
  
   or
  
   CFSET my_var = another_var
  
   There is only one thing for *another_var* to be: a variable.  If you
  wanted
   my_var to hold the string another_var you should quote the
 right hand
   side:
  
   CFSET my_var = another_var
  
   So my .02 is that pounds just clutter up your statement.
  
   Reuben Poon
  
  
   -Original Message-
   From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, May 09, 2002 1:35 PM
   To: CF-Talk
   Subject: Re: Form.FIELDNAME - error
   Importance: Low
  
  
   Tim,
  
   I wouldn't call that bad practice, It should actually be called good
   practice (at least in my book).  You are setting a variable and the ##
   around the variable show that it is a variable, makes for easier
 reading.
   Now, ## on the set side would be considered bad practice.
  
   my .02
  
   Paul Giesenhagen
   QuillDesign
   http://www.quilldesign.com
   SiteDirector Commerce Builder
  
  
Not sure if this is an error or just a bad practice, but you don't
 need
   the
# signs in your variable declaration (cfset)
   
CFSET var = ListGetAt(Form.FIELDNAMES, i)
   
works just fine.  Also you don't need to generate that var
 at all you
  can
just do a list loop like this:
   
CFLOOP list=#form.fieldnames# index=formField
#formField# = #evaluate(formField)#
CFLOOP
   
Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net
   
 -Original Message-
 From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 4:16 PM
 To: CF-Talk
 Subject: Form.FIELDNAME - error


 Hi,

  Can any one tell me what is the mistake in

 CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1
 INDEX=i
 CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
 #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
 BR
 /CFLOOP


 I am getting the following error:

 An error occurred while evaluating the expression:
 #ListLen(FORM.FIELDNAMES)#


  Any help on this is appreciated.

 thanks,
 Sudheer Chakka.


   
  
  
 
 
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Andrew Tyrone

 Hi,

That didn't solve my problem. It is not even recognising the
 Form.FieldNames

   CFLOOP list=#form.fieldnames# index=formField
   #formField# = #evaluate('form' formField)# br /
   /CFLOOP

   it is giving error in the first line of the above code.

 Any more suggestions.

 Thanks,
 Sudheer Chakka.



Hi there!

A few things to note:

As far as I know, from CF 4.5 on, the FORM scope has been a structure.  One
thing I noticed about the FORM structure is that it will exist regardless of
what page you are on, meaning if you click a link that goes to a page with
just text (a cfm page, of course), the FORM structure is still available,
just like if you had submitted a form on that previous page.

That said, with the FORM scope being a structure, you can write cleaner,
faster code by excluding the Evaluate() function, like so:

!--- FORM struct output, example 1 ---
cfoutput
cfloop list=#form.fieldnames# index=formField
#formField# = #FORM[formField]#br /
/cfloop
/cfoutput

You can even go further, by looping over the FORM structure with the
collection attribute in the cfloop tag:

!--- FORM struct, example 2 ---
cfoutput
cfloop collection=#FORM# item=formField
#formField# = #FORM[formField]#br /
/cfloop
/cfoutput


Note that the second example will also display the form field
FORM.fieldnames, unlike the first example where you are actually looping
over that field, which is in fact a list of all your fieldnames, except that
one... Get it? ;)

You can stick the second example in any page and it should work, regardless
of if a form was submitted.  The FORM scope will be empty in this case.  The
first requires that a form was submitted, since FORM.FIELDNAMES won't exist
if a form wasn't submitted.


--Andy


__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Form.FIELDNAME - error!!!!

2002-05-09 Thread Paul Giesenhagen

I guess my example was:

cfquery datasource=dsn name=getitems
select first_name, last_name
from tablename
/cfquery

cfoutput
cfloop query=getitems
cfset variables.full_name = #getitems.first_name#
#getitems.last_name#
.OR .
cfset variables.first_name = #getitems.first_name#
 AS opposed to...
cfset variables.first_name = getitems.first_name

/cfloop
/cfoutput

Now, I will say that I used to not put the #'s, but it made it easier (not
cleaner) for new cf users we have to read the code, it told them that
#something# was a variable and not explicit..

This is definately nit-picky ...  But I guess I am on an island :)!

The speed issue?  About the same difference as cfif vs. cfswitch...

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder



 I vote for Reuben on this. I disagree with your argument. While you want
 periods in a book. You. Don't. Want. Too. Many. Of. Them. People new to CF
 often over use pound signs. So we are encouraged to learn when they're not
 needed and then not use them. Thus Reuben's and my preference for not
using
 them when not needed. That doesn't mean it's the only right way, but it
 certainly is one of them.

 I don't understand your example: cfset variables.my_var = query.column
 It's obvious that you're setting your variable to the two words separated
by
 a period.

 I also write things like cfif MyQuery.RecordCount and I think this is
 easier to read (for me anyway) than cfif MyQuery.RecordCount GT 0.

 Matt

 - Original Message -
 From: Paul Giesenhagen [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Friday, May 10, 2002 8:53 AM
 Subject: Re: Form.FIELDNAME - error


  I understand your point, but it is like saying periods clutter up pages
in
 a
  book.
 
  If you have:
 
  cfset variables.my_var = #query.column#
  That tells me that there is a variable being set and it is a string
 
  cfset variables.my_var = query.column
 
  Am I setting my variable to the two words seperated by a period,
  query.column? or to a variable query.column?
 
  To each his own, but it makes more sense to me to see those pounds on
the
  right hand side ..  Plus reading a book with periods is easier too :)
 
  Paul Giesenhagen
  QuillDesign
  http://www.quilldesign.com
  SiteDirector Commerce Builder
 
 
 
 
   I think that the # on the right side of the set operand is redundant.
  
   CFSET my_var = #another_var#
  
   or
  
   CFSET my_var = another_var
  
   There is only one thing for *another_var* to be: a variable.  If you
  wanted
   my_var to hold the string another_var you should quote the right
hand
   side:
  
   CFSET my_var = another_var
  
   So my .02 is that pounds just clutter up your statement.
  
   Reuben Poon
  
  
   -Original Message-
   From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, May 09, 2002 1:35 PM
   To: CF-Talk
   Subject: Re: Form.FIELDNAME - error
   Importance: Low
  
  
   Tim,
  
   I wouldn't call that bad practice, It should actually be called good
   practice (at least in my book).  You are setting a variable and the ##
   around the variable show that it is a variable, makes for easier
 reading.
   Now, ## on the set side would be considered bad practice.
  
   my .02
  
   Paul Giesenhagen
   QuillDesign
   http://www.quilldesign.com
   SiteDirector Commerce Builder
  
  
Not sure if this is an error or just a bad practice, but you don't
 need
   the
# signs in your variable declaration (cfset)
   
CFSET var = ListGetAt(Form.FIELDNAMES, i)
   
works just fine.  Also you don't need to generate that var at all
you
  can
just do a list loop like this:
   
CFLOOP list=#form.fieldnames# index=formField
#formField# = #evaluate(formField)#
CFLOOP
   
Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net
   
 -Original Message-
 From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 4:16 PM
 To: CF-Talk
 Subject: Form.FIELDNAME - error


 Hi,

  Can any one tell me what is the mistake in

 CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1
INDEX=i
 CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
 #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
 BR
 /CFLOOP


 I am getting the following error:

 An error occurred while evaluating the expression:
 #ListLen(FORM.FIELDNAMES)#


  Any help on this is appreciated.

 thanks,
 Sudheer Chakka.


   
  
  
 
 
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http

RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Timothy Heald

Very cool.  That's going in the snippets.

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

 -Original Message-
 From: Andrew Tyrone [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 5:41 PM
 To: CF-Talk
 Subject: RE: Form.FIELDNAME - error


  Hi,
 
 That didn't solve my problem. It is not even recognising the
  Form.FieldNames
 
  CFLOOP list=#form.fieldnames# index=formField
  #formField# = #evaluate('form' formField)# br /
  /CFLOOP
 
  it is giving error in the first line of the above code.
 
  Any more suggestions.
 
  Thanks,
  Sudheer Chakka.



 Hi there!

 A few things to note:

 As far as I know, from CF 4.5 on, the FORM scope has been a
 structure.  One
 thing I noticed about the FORM structure is that it will exist
 regardless of
 what page you are on, meaning if you click a link that goes to a page with
 just text (a cfm page, of course), the FORM structure is still available,
 just like if you had submitted a form on that previous page.

 That said, with the FORM scope being a structure, you can write cleaner,
 faster code by excluding the Evaluate() function, like so:

 !--- FORM struct output, example 1 ---
 cfoutput
 cfloop list=#form.fieldnames# index=formField
   #formField# = #FORM[formField]#br /
 /cfloop
 /cfoutput

 You can even go further, by looping over the FORM structure with the
 collection attribute in the cfloop tag:

 !--- FORM struct, example 2 ---
 cfoutput
 cfloop collection=#FORM# item=formField
   #formField# = #FORM[formField]#br /
 /cfloop
 /cfoutput


 Note that the second example will also display the form field
 FORM.fieldnames, unlike the first example where you are actually looping
 over that field, which is in fact a list of all your fieldnames,
 except that
 one... Get it? ;)

 You can stick the second example in any page and it should work,
 regardless
 of if a form was submitted.  The FORM scope will be empty in this
 case.  The
 first requires that a form was submitted, since FORM.FIELDNAMES
 won't exist
 if a form wasn't submitted.


 --Andy


 
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Reuben Poon

Paul,

Interesting point about making it easier for new CF users to read the code.
I am all for making code easier to read for EVERYONE.

Putting all your code into one huge file would make it easier for new CF
users to read as well.  This doesn't mean it is a good idea though.

In this case I think it is good to just educate the new CF users.

Reuben


-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 2:48 PM
To: CF-Talk
Subject: Re: Form.FIELDNAME - error
Importance: Low


I guess my example was:

cfquery datasource=dsn name=getitems
select first_name, last_name
from tablename
/cfquery

cfoutput
cfloop query=getitems
cfset variables.full_name = #getitems.first_name#
#getitems.last_name#
.OR .
cfset variables.first_name = #getitems.first_name#
 AS opposed to...
cfset variables.first_name = getitems.first_name

/cfloop
/cfoutput

Now, I will say that I used to not put the #'s, but it made it easier (not
cleaner) for new cf users we have to read the code, it told them that
#something# was a variable and not explicit..

This is definately nit-picky ...  But I guess I am on an island :)!

The speed issue?  About the same difference as cfif vs. cfswitch...

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder



 I vote for Reuben on this. I disagree with your argument. While you want
 periods in a book. You. Don't. Want. Too. Many. Of. Them. People new to CF
 often over use pound signs. So we are encouraged to learn when they're not
 needed and then not use them. Thus Reuben's and my preference for not
using
 them when not needed. That doesn't mean it's the only right way, but it
 certainly is one of them.

 I don't understand your example: cfset variables.my_var = query.column
 It's obvious that you're setting your variable to the two words separated
by
 a period.

 I also write things like cfif MyQuery.RecordCount and I think this is
 easier to read (for me anyway) than cfif MyQuery.RecordCount GT 0.

 Matt

 - Original Message -
 From: Paul Giesenhagen [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Friday, May 10, 2002 8:53 AM
 Subject: Re: Form.FIELDNAME - error


  I understand your point, but it is like saying periods clutter up pages
in
 a
  book.
 
  If you have:
 
  cfset variables.my_var = #query.column#
  That tells me that there is a variable being set and it is a string
 
  cfset variables.my_var = query.column
 
  Am I setting my variable to the two words seperated by a period,
  query.column? or to a variable query.column?
 
  To each his own, but it makes more sense to me to see those pounds on
the
  right hand side ..  Plus reading a book with periods is easier too :)
 
  Paul Giesenhagen
  QuillDesign
  http://www.quilldesign.com
  SiteDirector Commerce Builder
 
 
 
 
   I think that the # on the right side of the set operand is redundant.
  
   CFSET my_var = #another_var#
  
   or
  
   CFSET my_var = another_var
  
   There is only one thing for *another_var* to be: a variable.  If you
  wanted
   my_var to hold the string another_var you should quote the right
hand
   side:
  
   CFSET my_var = another_var
  
   So my .02 is that pounds just clutter up your statement.
  
   Reuben Poon
  
  
   -Original Message-
   From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, May 09, 2002 1:35 PM
   To: CF-Talk
   Subject: Re: Form.FIELDNAME - error
   Importance: Low
  
  
   Tim,
  
   I wouldn't call that bad practice, It should actually be called good
   practice (at least in my book).  You are setting a variable and the ##
   around the variable show that it is a variable, makes for easier
 reading.
   Now, ## on the set side would be considered bad practice.
  
   my .02
  
   Paul Giesenhagen
   QuillDesign
   http://www.quilldesign.com
   SiteDirector Commerce Builder
  
  
Not sure if this is an error or just a bad practice, but you don't
 need
   the
# signs in your variable declaration (cfset)
   
CFSET var = ListGetAt(Form.FIELDNAMES, i)
   
works just fine.  Also you don't need to generate that var at all
you
  can
just do a list loop like this:
   
CFLOOP list=#form.fieldnames# index=formField
#formField# = #evaluate(formField)#
CFLOOP
   
Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net
   
 -Original Message-
 From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 4:16 PM
 To: CF-Talk
 Subject: Form.FIELDNAME - error


 Hi,

  Can any one tell me what is the mistake in

 CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1
INDEX=i
 CFSET var = #ListGetAt(Form.FIELDNAMES, i)#
 #ListGetAt(Form.FIELDNAMES, i)# = #Evaluate(var)#
 BR
 /CFLOOP


 I am getting the following error:

 An error

RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Timothy Heald

I would think that best practices in this case would be to allow the DB to
do it's job.  I know on SQL Server I do:

cfquery datasource=#dsn# name=getItems
 select cFirstName + ' ' + cLastName as cFullName
 from tablename
/cfquery

I think that may even be ansi SQL and should be availabe to most rdbms.

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 5:48 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error


 I guess my example was:

 cfquery datasource=dsn name=getitems
 select first_name, last_name
 from tablename
 /cfquery

 cfoutput
 cfloop query=getitems
 cfset variables.full_name = #getitems.first_name#
 #getitems.last_name#
 .OR .
 cfset variables.first_name = #getitems.first_name#
  AS opposed to...
 cfset variables.first_name = getitems.first_name

 /cfloop
 /cfoutput

 Now, I will say that I used to not put the #'s, but it made it easier (not
 cleaner) for new cf users we have to read the code, it told them that
 #something# was a variable and not explicit..

 This is definately nit-picky ...  But I guess I am on an island :)!

 The speed issue?  About the same difference as cfif vs. cfswitch...

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector Commerce Builder



  I vote for Reuben on this. I disagree with your argument. While you want
  periods in a book. You. Don't. Want. Too. Many. Of. Them.
 People new to CF
  often over use pound signs. So we are encouraged to learn when
 they're not
  needed and then not use them. Thus Reuben's and my preference for not
 using
  them when not needed. That doesn't mean it's the only right way, but it
  certainly is one of them.
 
  I don't understand your example: cfset variables.my_var =
 query.column
  It's obvious that you're setting your variable to the two words
 separated
 by
  a period.
 
  I also write things like cfif MyQuery.RecordCount and I think this is
  easier to read (for me anyway) than cfif MyQuery.RecordCount GT 0.
 
  Matt
 
  - Original Message -
  From: Paul Giesenhagen [EMAIL PROTECTED]
  To: CF-Talk [EMAIL PROTECTED]
  Sent: Friday, May 10, 2002 8:53 AM
  Subject: Re: Form.FIELDNAME - error
 
 
   I understand your point, but it is like saying periods
 clutter up pages
 in
  a
   book.
  
   If you have:
  
   cfset variables.my_var = #query.column#
   That tells me that there is a variable being set and it is a string
  
   cfset variables.my_var = query.column
  
   Am I setting my variable to the two words seperated by a period,
   query.column? or to a variable query.column?
  
   To each his own, but it makes more sense to me to see those pounds on
 the
   right hand side ..  Plus reading a book with periods is easier too :)
  
   Paul Giesenhagen
   QuillDesign
   http://www.quilldesign.com
   SiteDirector Commerce Builder
  
  
  
  
I think that the # on the right side of the set operand is
 redundant.
   
CFSET my_var = #another_var#
   
or
   
CFSET my_var = another_var
   
There is only one thing for *another_var* to be: a variable.  If you
   wanted
my_var to hold the string another_var you should quote the right
 hand
side:
   
CFSET my_var = another_var
   
So my .02 is that pounds just clutter up your statement.
   
Reuben Poon
   
   
-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 1:35 PM
To: CF-Talk
Subject: Re: Form.FIELDNAME - error
Importance: Low
   
   
Tim,
   
I wouldn't call that bad practice, It should actually be called good
practice (at least in my book).  You are setting a variable
 and the ##
around the variable show that it is a variable, makes for easier
  reading.
Now, ## on the set side would be considered bad practice.
   
my .02
   
Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder
   
   
 Not sure if this is an error or just a bad practice, but you don't
  need
the
 # signs in your variable declaration (cfset)

 CFSET var = ListGetAt(Form.FIELDNAMES, i)

 works just fine.  Also you don't need to generate that var at all
 you
   can
 just do a list loop like this:

 CFLOOP list=#form.fieldnames# index=formField
 #formField# = #evaluate(formField)#
 CFLOOP

 Tim Heald
 ACP/CCFD :)
 Application Development
 www.schoollink.net

  -Original Message-
  From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 4:16 PM
  To: CF-Talk
  Subject: Form.FIELDNAME - error
 
 
  Hi,
 
   Can any one tell me what is the mistake in
 
  CFLOOP FROM=1 TO=#ListLen(FORM.FIELDNAMES)# STEP=1
 INDEX=i
  CFSET var

Re: Form.FIELDNAME - error!!!!

2002-05-09 Thread Paul Giesenhagen

Ahh good point ...

(I dont think this is something to split hairs about ... but ya'll have
given good points to think about!  I am not in concrete)

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder



 Paul,

 Interesting point about making it easier for new CF users to read the
code.
 I am all for making code easier to read for EVERYONE.

 Putting all your code into one huge file would make it easier for new CF
 users to read as well.  This doesn't mean it is a good idea though.

 In this case I think it is good to just educate the new CF users.

 Reuben


 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 2:48 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error
 Importance: Low


 I guess my example was:

 cfquery datasource=dsn name=getitems
 select first_name, last_name
 from tablename
 /cfquery

 cfoutput
 cfloop query=getitems
 cfset variables.full_name = #getitems.first_name#
 #getitems.last_name#
 .OR .
 cfset variables.first_name = #getitems.first_name#
  AS opposed to...
 cfset variables.first_name = getitems.first_name

 /cfloop
 /cfoutput

 Now, I will say that I used to not put the #'s, but it made it easier (not
 cleaner) for new cf users we have to read the code, it told them that
 #something# was a variable and not explicit..

 This is definately nit-picky ...  But I guess I am on an island :)!

 The speed issue?  About the same difference as cfif vs. cfswitch...

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector Commerce Builder



  I vote for Reuben on this. I disagree with your argument. While you want
  periods in a book. You. Don't. Want. Too. Many. Of. Them. People new to
CF
  often over use pound signs. So we are encouraged to learn when they're
not
  needed and then not use them. Thus Reuben's and my preference for not
 using
  them when not needed. That doesn't mean it's the only right way, but it
  certainly is one of them.
 
  I don't understand your example: cfset variables.my_var =
query.column
  It's obvious that you're setting your variable to the two words
separated
 by
  a period.
 
  I also write things like cfif MyQuery.RecordCount and I think this is
  easier to read (for me anyway) than cfif MyQuery.RecordCount GT 0.
 
  Matt
 
  - Original Message -
  From: Paul Giesenhagen [EMAIL PROTECTED]
  To: CF-Talk [EMAIL PROTECTED]
  Sent: Friday, May 10, 2002 8:53 AM
  Subject: Re: Form.FIELDNAME - error
 
 
   I understand your point, but it is like saying periods clutter up
pages
 in
  a
   book.
  
   If you have:
  
   cfset variables.my_var = #query.column#
   That tells me that there is a variable being set and it is a string
  
   cfset variables.my_var = query.column
  
   Am I setting my variable to the two words seperated by a period,
   query.column? or to a variable query.column?
  
   To each his own, but it makes more sense to me to see those pounds on
 the
   right hand side ..  Plus reading a book with periods is easier too :)
  
   Paul Giesenhagen
   QuillDesign
   http://www.quilldesign.com
   SiteDirector Commerce Builder
  
  
  
  
I think that the # on the right side of the set operand is
redundant.
   
CFSET my_var = #another_var#
   
or
   
CFSET my_var = another_var
   
There is only one thing for *another_var* to be: a variable.  If you
   wanted
my_var to hold the string another_var you should quote the right
 hand
side:
   
CFSET my_var = another_var
   
So my .02 is that pounds just clutter up your statement.
   
Reuben Poon
   
   
-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 1:35 PM
To: CF-Talk
Subject: Re: Form.FIELDNAME - error
Importance: Low
   
   
Tim,
   
I wouldn't call that bad practice, It should actually be called good
practice (at least in my book).  You are setting a variable and the
##
around the variable show that it is a variable, makes for easier
  reading.
Now, ## on the set side would be considered bad practice.
   
my .02
   
Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder
   
   
 Not sure if this is an error or just a bad practice, but you don't
  need
the
 # signs in your variable declaration (cfset)

 CFSET var = ListGetAt(Form.FIELDNAMES, i)

 works just fine.  Also you don't need to generate that var at all
 you
   can
 just do a list loop like this:

 CFLOOP list=#form.fieldnames# index=formField
 #formField# = #evaluate(formField)#
 CFLOOP

 Tim Heald
 ACP/CCFD :)
 Application Development
 www.schoollink.net

  -Original Message-
  From: Chakka, Sudheer [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 4:16 PM

RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Reuben Poon

Cool.  I'm not that nitpicky about something this inconsequential.  But it
was a good conversation.  Thanks guys!

Reuben Poon


-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 3:03 PM
To: CF-Talk
Subject: Re: Form.FIELDNAME - error
Importance: Low


Ahh good point ...

(I dont think this is something to split hairs about ... but ya'll have
given good points to think about!  I am not in concrete)

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder



 Paul,

 Interesting point about making it easier for new CF users to read the
code.
 I am all for making code easier to read for EVERYONE.

 Putting all your code into one huge file would make it easier for new CF
 users to read as well.  This doesn't mean it is a good idea though.

 In this case I think it is good to just educate the new CF users.

 Reuben


 -Original Message-
 From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 2:48 PM
 To: CF-Talk
 Subject: Re: Form.FIELDNAME - error
 Importance: Low


 I guess my example was:

 cfquery datasource=dsn name=getitems
 select first_name, last_name
 from tablename
 /cfquery

 cfoutput
 cfloop query=getitems
 cfset variables.full_name = #getitems.first_name#
 #getitems.last_name#
 .OR .
 cfset variables.first_name = #getitems.first_name#
  AS opposed to...
 cfset variables.first_name = getitems.first_name

 /cfloop
 /cfoutput

 Now, I will say that I used to not put the #'s, but it made it easier (not
 cleaner) for new cf users we have to read the code, it told them that
 #something# was a variable and not explicit..

 This is definately nit-picky ...  But I guess I am on an island :)!

 The speed issue?  About the same difference as cfif vs. cfswitch...

 Paul Giesenhagen
 QuillDesign
 http://www.quilldesign.com
 SiteDirector Commerce Builder



  I vote for Reuben on this. I disagree with your argument. While you want
  periods in a book. You. Don't. Want. Too. Many. Of. Them. People new to
CF
  often over use pound signs. So we are encouraged to learn when they're
not
  needed and then not use them. Thus Reuben's and my preference for not
 using
  them when not needed. That doesn't mean it's the only right way, but it
  certainly is one of them.
 
  I don't understand your example: cfset variables.my_var =
query.column
  It's obvious that you're setting your variable to the two words
separated
 by
  a period.
 
  I also write things like cfif MyQuery.RecordCount and I think this is
  easier to read (for me anyway) than cfif MyQuery.RecordCount GT 0.
 
  Matt
 
  - Original Message -
  From: Paul Giesenhagen [EMAIL PROTECTED]
  To: CF-Talk [EMAIL PROTECTED]
  Sent: Friday, May 10, 2002 8:53 AM
  Subject: Re: Form.FIELDNAME - error
 
 
   I understand your point, but it is like saying periods clutter up
pages
 in
  a
   book.
  
   If you have:
  
   cfset variables.my_var = #query.column#
   That tells me that there is a variable being set and it is a string
  
   cfset variables.my_var = query.column
  
   Am I setting my variable to the two words seperated by a period,
   query.column? or to a variable query.column?
  
   To each his own, but it makes more sense to me to see those pounds on
 the
   right hand side ..  Plus reading a book with periods is easier too :)
  
   Paul Giesenhagen
   QuillDesign
   http://www.quilldesign.com
   SiteDirector Commerce Builder
  
  
  
  
I think that the # on the right side of the set operand is
redundant.
   
CFSET my_var = #another_var#
   
or
   
CFSET my_var = another_var
   
There is only one thing for *another_var* to be: a variable.  If you
   wanted
my_var to hold the string another_var you should quote the right
 hand
side:
   
CFSET my_var = another_var
   
So my .02 is that pounds just clutter up your statement.
   
Reuben Poon
   
   
-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 1:35 PM
To: CF-Talk
Subject: Re: Form.FIELDNAME - error
Importance: Low
   
   
Tim,
   
I wouldn't call that bad practice, It should actually be called good
practice (at least in my book).  You are setting a variable and the
##
around the variable show that it is a variable, makes for easier
  reading.
Now, ## on the set side would be considered bad practice.
   
my .02
   
Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder
   
   
 Not sure if this is an error or just a bad practice, but you don't
  need
the
 # signs in your variable declaration (cfset)

 CFSET var = ListGetAt(Form.FIELDNAMES, i)

 works just fine.  Also you don't need to generate that var at all
 you
   can
 just do a list loop like this:

 CFLOOP list

RE: Form.FIELDNAME - error!!!!

2002-05-09 Thread Timothy Heald

Also
 The speed issue?  About the same difference as cfif vs. cfswitch...

The main reason I would use switch over if is to make it easer to read, and
easier to maintain.  That it is faster is just a bonus.  Thats like saying:

CFSET var1 = this
CFSET var2 = that
CFSET var3 = foo
CFSET var4 = bar

is better than:

CFSCRIPT
var1 = this;
var2 = that;
var3 = foo;
var4 = bar;
/CFSCRIPT

or that in this case it wouldn't make the most sense to use:

CFSCRIPT
var = arrayNew(4);
var[1] = this;
var[2] = that;
var[3] = foo;
var[4] = bar;
/CFSCRIPT

The third is both faster and easier to read as far as I am concerned.  Now I
hear people say that the amount of time you save is so small that it's not
even worth worrying about, well the way I see it is if you use ALL the
fastest and most optimized code you can, then it will add up, and be
noticeable.  Even if it is not noticeable to a single user, it can also help
reduce your processor load on heavy hit sites.  When requests are over
quicker, more requests can be processed faster and so on.  Also we shouldn't
cater coding standards to the beginner, we should train and assist the
beginner to the standard.

My 0.02

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

 -Original Message-
 From: Timothy Heald [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 09, 2002 5:56 PM
 To: CF-Talk
 Subject: RE: Form.FIELDNAME - error


 I would think that best practices in this case would be to allow the DB to
 do it's job.  I know on SQL Server I do:

 cfquery datasource=#dsn# name=getItems
  select cFirstName + ' ' + cLastName as cFullName
  from tablename
 /cfquery

 I think that may even be ansi SQL and should be availabe to most rdbms.

 Tim Heald
 ACP/CCFD :)
 Application Development
 www.schoollink.net

  -Original Message-
  From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 5:48 PM
  To: CF-Talk
  Subject: Re: Form.FIELDNAME - error
 
 
  I guess my example was:
 
  cfquery datasource=dsn name=getitems
  select first_name, last_name
  from tablename
  /cfquery
 
  cfoutput
  cfloop query=getitems
  cfset variables.full_name = #getitems.first_name#
  #getitems.last_name#
  .OR .
  cfset variables.first_name = #getitems.first_name#
   AS opposed to...
  cfset variables.first_name = getitems.first_name
 
  /cfloop
  /cfoutput
 
  Now, I will say that I used to not put the #'s, but it made it
 easier (not
  cleaner) for new cf users we have to read the code, it told them that
  #something# was a variable and not explicit..
 
  This is definately nit-picky ...  But I guess I am on an island :)!
 
  The speed issue?  About the same difference as cfif vs. cfswitch...
 
  Paul Giesenhagen
  QuillDesign
  http://www.quilldesign.com
  SiteDirector Commerce Builder
 
 
 
   I vote for Reuben on this. I disagree with your argument.
 While you want
   periods in a book. You. Don't. Want. Too. Many. Of. Them.
  People new to CF
   often over use pound signs. So we are encouraged to learn when
  they're not
   needed and then not use them. Thus Reuben's and my preference for not
  using
   them when not needed. That doesn't mean it's the only right
 way, but it
   certainly is one of them.
  
   I don't understand your example: cfset variables.my_var =
  query.column
   It's obvious that you're setting your variable to the two words
  separated
  by
   a period.
  
   I also write things like cfif MyQuery.RecordCount and I
 think this is
   easier to read (for me anyway) than cfif MyQuery.RecordCount GT 0.
  
   Matt
  
   - Original Message -
   From: Paul Giesenhagen [EMAIL PROTECTED]
   To: CF-Talk [EMAIL PROTECTED]
   Sent: Friday, May 10, 2002 8:53 AM
   Subject: Re: Form.FIELDNAME - error
  
  
I understand your point, but it is like saying periods
  clutter up pages
  in
   a
book.
   
If you have:
   
cfset variables.my_var = #query.column#
That tells me that there is a variable being set and it is a string
   
cfset variables.my_var = query.column
   
Am I setting my variable to the two words seperated by a period,
query.column? or to a variable query.column?
   
To each his own, but it makes more sense to me to see those
 pounds on
  the
right hand side ..  Plus reading a book with periods is
 easier too :)
   
Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder
   
   
   
   
 I think that the # on the right side of the set operand is
  redundant.

 CFSET my_var = #another_var#

 or

 CFSET my_var = another_var

 There is only one thing for *another_var* to be: a
 variable.  If you
wanted
 my_var to hold the string another_var you should quote the right
  hand
 side:

 CFSET my_var = another_var

 So my

Re: Form.FIELDNAME - error!!!!

2002-05-09 Thread Paul Giesenhagen

And I suppose you think fusebox is a methodology..  :)   Couldn't resist
.

But I agree with you that every little but helps and compound that by 50
helps and a half a million users a day .. then it makes huge differences.

I am not one to stick with anything .. I have recently moved from one mehod
of doing things to another ... and it was very hard for me . but in the long
run it is going to pay off!

My ears are always open..

Paul Giesenhagen
QuillDesign
http://www.quilldesign.com
SiteDirector Commerce Builder



 Also
  The speed issue?  About the same difference as cfif vs. cfswitch...

 The main reason I would use switch over if is to make it easer to read,
and
 easier to maintain.  That it is faster is just a bonus.  Thats like
saying:

 CFSET var1 = this
 CFSET var2 = that
 CFSET var3 = foo
 CFSET var4 = bar

 is better than:

 CFSCRIPT
 var1 = this;
 var2 = that;
 var3 = foo;
 var4 = bar;
 /CFSCRIPT

 or that in this case it wouldn't make the most sense to use:

 CFSCRIPT
 var = arrayNew(4);
 var[1] = this;
 var[2] = that;
 var[3] = foo;
 var[4] = bar;
 /CFSCRIPT

 The third is both faster and easier to read as far as I am concerned.  Now
I
 hear people say that the amount of time you save is so small that it's not
 even worth worrying about, well the way I see it is if you use ALL the
 fastest and most optimized code you can, then it will add up, and be
 noticeable.  Even if it is not noticeable to a single user, it can also
help
 reduce your processor load on heavy hit sites.  When requests are over
 quicker, more requests can be processed faster and so on.  Also we
shouldn't
 cater coding standards to the beginner, we should train and assist the
 beginner to the standard.

 My 0.02

 Tim Heald
 ACP/CCFD :)
 Application Development
 www.schoollink.net

  -Original Message-
  From: Timothy Heald [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 09, 2002 5:56 PM
  To: CF-Talk
  Subject: RE: Form.FIELDNAME - error
 
 
  I would think that best practices in this case would be to allow the DB
to
  do it's job.  I know on SQL Server I do:
 
  cfquery datasource=#dsn# name=getItems
   select cFirstName + ' ' + cLastName as cFullName
   from tablename
  /cfquery
 
  I think that may even be ansi SQL and should be availabe to most rdbms.
 
  Tim Heald
  ACP/CCFD :)
  Application Development
  www.schoollink.net
 
   -Original Message-
   From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, May 09, 2002 5:48 PM
   To: CF-Talk
   Subject: Re: Form.FIELDNAME - error
  
  
   I guess my example was:
  
   cfquery datasource=dsn name=getitems
   select first_name, last_name
   from tablename
   /cfquery
  
   cfoutput
   cfloop query=getitems
   cfset variables.full_name = #getitems.first_name#
   #getitems.last_name#
   .OR .
   cfset variables.first_name = #getitems.first_name#
    AS opposed to...
   cfset variables.first_name = getitems.first_name
  
   /cfloop
   /cfoutput
  
   Now, I will say that I used to not put the #'s, but it made it
  easier (not
   cleaner) for new cf users we have to read the code, it told them that
   #something# was a variable and not explicit..
  
   This is definately nit-picky ...  But I guess I am on an island :)!
  
   The speed issue?  About the same difference as cfif vs. cfswitch...
  
   Paul Giesenhagen
   QuillDesign
   http://www.quilldesign.com
   SiteDirector Commerce Builder
  
  
  
I vote for Reuben on this. I disagree with your argument.
  While you want
periods in a book. You. Don't. Want. Too. Many. Of. Them.
   People new to CF
often over use pound signs. So we are encouraged to learn when
   they're not
needed and then not use them. Thus Reuben's and my preference for
not
   using
them when not needed. That doesn't mean it's the only right
  way, but it
certainly is one of them.
   
I don't understand your example: cfset variables.my_var =
   query.column
It's obvious that you're setting your variable to the two words
   separated
   by
a period.
   
I also write things like cfif MyQuery.RecordCount and I
  think this is
easier to read (for me anyway) than cfif MyQuery.RecordCount GT 0.
   
Matt
   
- Original Message -
From: Paul Giesenhagen [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, May 10, 2002 8:53 AM
Subject: Re: Form.FIELDNAME - error
   
   
 I understand your point, but it is like saying periods
   clutter up pages
   in
a
 book.

 If you have:

 cfset variables.my_var = #query.column#
 That tells me that there is a variable being set and it is a
string

 cfset variables.my_var = query.column

 Am I setting my variable to the two words seperated by a period,
 query.column? or to a variable query.column?

 To each his own, but it makes more sense to me to see those