Syntax is driving me nuts!

2013-08-20 Thread Rick Sanders
Hey guys, I'm trying to add multiple items to a database based on if a check box is checked. This code works fine: cfif IsNumeric(#form['qty_' upd]#) But I want to make sure the box is checked or not. When I do this: cfif IsDefined(#form['rel_' ar]#) I get: Element rel_1 is undefined in a

Re: Syntax is driving me nuts!

2013-08-20 Thread Raymond Camden
Use structKeyExists. cfif structKeyExists(form, qty_#upd#) On Tue, Aug 20, 2013 at 10:48 AM, Rick Sanders r...@webenergy.ca wrote: Hey guys, I'm trying to add multiple items to a database based on if a check box is checked. This code works fine: cfif IsNumeric(#form['qty_' upd]#)

Re: Syntax is driving me nuts!

2013-08-20 Thread Leigh
IsDefined does not accept array notation. You need to rewrite it using dot notation:   IsDefined(form.rel_#ar#) or   IsDefined(form.rel_ ar) The other option is to use StructKeyExists, which is generally preferred because it is a little more precise than

RE: Syntax is driving me nuts!

2013-08-20 Thread DURETTE, STEVEN J
is driving me nuts! Hey guys, I'm trying to add multiple items to a database based on if a check box is checked. This code works fine: cfif IsNumeric(#form['qty_' upd]#) But I want to make sure the box is checked or not. When I do this: cfif IsDefined(#form['rel_' ar]#) I get: Element rel_1

Re: Syntax is driving me nuts!

2013-08-20 Thread Captain Obvious
IsDefined(form.rel_#ar#) On Tue, Aug 20, 2013 at 11:55 AM, Raymond Camden raymondcam...@gmail.comwrote: Use structKeyExists. cfif structKeyExists(form, qty_#upd#) On Tue, Aug 20, 2013 at 10:48 AM, Rick Sanders r...@webenergy.ca wrote: Hey guys, I'm trying to add multiple items

RE: Syntax is driving me nuts!

2013-08-20 Thread Rick Sanders
Thanks a lot guys. I still have a lot to learn about CF. Kind Regards, Rick Sanders T: 902-401-7689 W: www.webenergy.ca -Original Message- From: DURETTE, STEVEN J [mailto:sd1...@att.com] Sent: Tuesday, August 20, 2013 12:56 PM To: cf-talk Subject: RE: Syntax is driving me nuts