Updates the specified key with the specified value. Returns Yes if the function is successful and throws an exception if an error occurs.
See also StructClear, StructDelete, StructFind, StructInsert, StructIsEmpty, StructKeyArray, StructCount, and StructKeyExists.
StructUpdate(structure, key, value)
Structure to be updated.
Key whose value is updated.
New value.
This function throws an exception if structure does not exist.
<!---------------------------------------------------------------------- This example illustrates the use of StructUpdate. It assumes that you have created and assigned values to the fields of a structure named EMPINFO within an include file. -----------------------------------------------------------------------> <CFIF StructIsEmpty(EMPINFO)> <CFOUTPUT>Error. No employee data was passed.</CFOUTPUT> <CFELSEIF StructFind(EMPINFO, "department") EQ ""> <CFSET rCode=StructUpdate(EMPINFO, "department", "Unassigned")> <CFELSE> ...