Maybe like this (if form.idListA contains a list of numbers)

<cfloop index="issueID" list="#FORM.idListA#"> <cfquery
datasource="Tribal_Matrix" name="getProject"> SELECT * FROM v_Project
WHERE Project_Nm = #FORM["SELPROJECT" & issueID]#
</cfquery>
</cfloop>

If form.idListA contains the maximum maybe it should be:
<cfloop index="issueID" from="1" to="#FORM.idListA#"> <cfquery
datasource="Tribal_Matrix" name="getProject"> SELECT * FROM v_Project
WHERE Project_Nm = #FORM["SELPROJECT" & issueID]#
</cfquery>
</cfloop>

> -----Original Message-----
> From: Morgan Senkal [mailto:[EMAIL PROTECTED]
> Sent: dinsdag 25 mei 2004 19:38
> To: CF-Talk
> Subject: Finding the right FORM field...
>
> How is this:
>
> Evaluate("SELPROJECT" & issueID)
>
> (issueID is a variable)
>
> Equal to this?:
>
> Error resolving parameter SELPROJECTFORM.IDLISTA
>
> Here is the whole code:
>
> <cfloop index="issueID" list="FORM.idListA"> <cfquery
> datasource="Tribal_Matrix" name="getProject"> SELECT * FROM
> v_Project WHERE Project_Nm =
> #StructFind(FORM,Evaluate("SELPROJECT" & issueID))#
> </cfquery>
> </cfloop>
>
> Basically I'm looping thru a list of numbers.  All the FORM
> fields have established names with one of these numbers at
> the end, I'd like to loop thru those field names in groups
> based on the number at the end.
> So the one in question above would look like FORM[SELPROJECT45]
>
>
> Perhaps I need an explanation of how Evaluate() works...and
> variables in loops too.  Thanks for any help!
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to