Link to home
Create AccountLog in
Avatar of JohnLucania
JohnLucania

asked on

cfquery with cfloop and $0

I have:

<CFLOOP index="per" From="1" To="#TimeIntervals#">
<CFIF per EQ 1><tr id="refRow"><CFELSE><tr></CFIF>

<CFSET txtPerDate = DateFormat(DateAdd(TimeSpan,per*TimeOffset,startdate) ,"MM/DD/YYYY")>
<cfoutput>
<td>Gift Amount</td>
<td>
<input type="text" name="GA#per#" length="10" maxlength="10" value="#txtPerAmt#" onBlur="AddGA(this.form);">
</td>
<td>
Pledge Start Date
</td>
<td>
<input type="text" name="PD#per#" length="10" maxlength="10" value="#txtPerDate#" onChange="formatDate(this);">
</td>
</cfoutput>
</tr>
</CFLOOP>

The values need to be inserted onto the fields:

       [installAmount] [float]
       [installDate] [datetime]

on a table.

Of course, there are other fields, but those will be repeated with the same values.

The only fields that will have different values are:

       [installAmount] [float]
       [installDate] [datetime]

Often, <input type="text" name="GA#per#" length="10" maxlength="10" value="#txtPerAmt#" onBlur="AddGA(this.form);"> can have $0, then I want to skip the specific data entry on cfquery.    


Avatar of mrichmon
mrichmon

<cfif  Form["GA" & per] NEQ 0>
    Do insert
<cfelse>
   Skip this one since it is $0
</cfif>
Avatar of JohnLucania

ASKER

Can you elaborate more with cfloop?
ASKER CERTIFIED SOLUTION
Avatar of mrichmon
mrichmon

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
great!

Can you please look at Q_21787408.html?