Matt, >What about this one: > ><cfloop collection="struct_Params" item="theKey"> > <cfset Evaluate(myObject.set#theKey#(struct_Params.#theKey#)" /> ></cfloop> > >Basically it is calling a setter method based on what is in the a >structure. >The cfset would evaluate to myObject.setFirstName('Matt')
This is untested, but you should be able to do: <cfloop collection="struct_Params" item="theKey"> <!---// should create a reference to the method //---> <cfset doMethod = myObject["set" & theKey] /> <!---// execute the method //---> <cfset doMethod(struct_Params[theKey]) /> </cfloop> -Dan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238006 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