|
Mailing Lists
|
Home / Groups / ColdFusion Newbie (CF-Newbie)
alternatives to evaluate in cfloopHi 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. > > > > <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 ""> > > |
May 23, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||