Todd,

If your primary key is being appended to the end
of a constant field name, the field name will never
be blank because of the first part being there.
Try this and see if it works.

<CFIF IsDefined('Form.txtField#primary_key#') AND #primary_key#
IS NOT "">
        Do my stuff
</CFIF>

You just want to check and see if the primary key itself is blank,
since that's the important part.  The other part will ALWAYS be
pass to your action page.  Let me know if that helps.

Scott Wolf
Webmaster / Network Administrator
Road Warrior Trading.com
http://www.roadwarriortrading.com

-----Original Message-----
From: Todd Ashworth [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 10, 2000 12:05 PM
To: [EMAIL PROTECTED]
Subject: Evaluate('Form.field#sub#')


I am trying to check for the existance of a dynamic Form.Field.  The actual
name of the form field is found by looping through a query and appending the
primary key to the end of the name:

name = "txtField#primary_key#"

On the form handler page, I have something like this:

<CFIF IsDefined('Form.txtField#primary_key#') AND Form.txtField#primary_key#
IS NOT "">
        Do my stuff
</CFIF>

The problem I have is, even when I leave the form field blank and submit the
form, it still does "Do my stuff", but returns an error saying that it can't
find a value for
#Evaluate('Form.txtField#primary_key#')#
So that means it's passing the CFIF statement even though it shouldn't be.

If I eneter a value, it works perfectly fine.  Any ideas?

Todd Ashworth
--------------------------------
Saber Corporation
Web Application Development
www.sabersite.com
(803) 327-0137 [111]
(803) 328-2868 (fax)


----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to