Ahh .. I see your point, but this is what I ended up with based on a few
earlier recomendations from Alexander

<CFIF IsDefined('Form.txtPaymentAmount#contact_id#') AND
Len(Evaluate('Form.txtPaymentAmount#contact_id#')) GT 0>

I don't believe, though, that your particular suggestion will work since I
am going through a loop on the second page to come up with the numbers .. it
kinda goes like this:

page_1.cfm
------------
<cfquery name="some_query" datasource="datasource">
    SELECT primary_key FROM my_table
</cfquery>

<form action = "page_2.cfm">
    <cfloop query = "some_query">
        <input name="txtInput#primary_key#>
    </cfloop>
    <input type = "Submit" value="Submit">
</form>

page_2.cfm
------------
<cfquery name="same_query_as_on_page_1" datasource="datasource">
    SELECT primary_key FROM my_table
</cfquery>

<cfloop query="same_query_as_on_page_1">
    <CFIF IsDefined('Form.txtInput#primary_key#') AND
Len(Evaluate('Form.txtInput#primary_key#')) GT 0>
        <!--- Do stuff --->
    </CFIF>
</cfloop>

If I only test for #primary_key#, it will always be true since I am pulling
that value back from a query on the second page.  This would be usefull for
telling me if a certain query row was returned, but doesn't really help to
tell if the box was filled on on the previous page, since I am, in essence,
looping with the same value I would be checking for.

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

----- Original Message -----
From: "Snazzo Boy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 10, 2000 1:21 PM
Subject: RE: Evaluate('Form.field#sub#')


> 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


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