Hi Ray Still no go. Just to avoid confusuion I changed the index to items so I don't get confused with variable scope.
<cfloop list="#variableNames#" index="items" delimiters = ","> and then <cfif structKeyExists(form, items) and form[items] is ""> doesn't generate any appropriate error messages when an entry is ommitted. When I just use <cfif form[items] is ""> I get the scope error (same if I use variables[items] Thanks for you help on this. Rob On 4 Apr 2012 at 21:56, Raymond Camden wrote: > Woah - this is way bad. > > On Wed, Apr 4, 2012 at 9:53 PM, Rob Voyle <[email protected]> > wrote: > > <cfloop list="#variableNames#" index="variableNames" delimiters = > ","> > > You can't say "use variable x as a list and make an index x too" - > it > overwrites the value. If variableNames is your list, you want > something else for index, like, variable perhaps. > > <cfloop list="#variablenames# "index="variable"> > > Then you can do > > <cfif structKeyExists(forms, variable) and forms[variable] is ""> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5846 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm
