Try this: <cfloop list="#foo.ColumnList#" index="index"> <cfif #IsNumeric(evaluate(index))#> SET index = form.index <cfelse> SET index = 'form.index' </cfif>
John Anderson http://www.aloha-webdesign.com -----Original Message----- From: Douglas Jordon [mailto:[EMAIL PROTECTED]] Sent: Friday, October 05, 2001 11:20 AM To: CF-Talk Subject: how to get the name and value of a field I created a little utility for myself that spits out inserts, updates, forms, a set of cfparams etc. when passed a dsn and a table name. I thought I'd try to go one better by enclosing the values in the insert and update statements in single quotes when necessary. But in order to do that, I need to access both the column name and the value of a field. Something like: <cfloop list="#foo.ColumnList#" index="index"> <cfif IsNumeric(foo.index)> SET index = form.index <cfelse> SET index = 'form.index' </cfif> It breaks because I don't know how to access the value of foo.index. Does anyone know how to do this? I hope I'm making sense. TIA, Doug Jordon ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

