You can't right now. You could add a third (optional) argument, that is
a list of fields NOT to include. Then on the second call, pass the
columnlist of the first query to that.

<cffunction name="Query2Form" returntype="string" output="false">
        <cfargument name="query" required="yes" type="query">
        <cfargument name="exclude" required="no" default=""
type="string">
        <cfargument name="extension" required="no" default="_asim"
type="string">
        <cfset var i = "">
        <cfset var out = "">
        <cfif query.recordCount>
        <cfloop list="#query.columnList#" index="i">
                <cfif NOT ListFindNoCase(exclude,i)>
                        <cfset out = out & '<input type="hidden"
name="#i##extension#" value="#HTMLEditFormat(query[i][1])#">'>
                </cfif>
        </cfloop>
        </cfif>
        <cfreturn out>
</cffunction>

Pascal

> -----Original Message-----
> From: Asim Manzur [mailto:[EMAIL PROTECTED]
> Sent: 15 December 2004 20:53
> To: CF-Talk
> Subject: Re: <QUERY2FORM>
> 
> The last thing which needs to be done is
> I have two different table which has same field names. when I am using
the
> function Query2Form, and these two variables comes to the loop it
becomes
> a comma delimated value.
> 
> How can I prevent to re-declare the already declared variable in
> Query2Form funciton ? ?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187858
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to