Yes, but you have to set it to true. If you set it to false, it will
throw an error if the key already exists. If you don't care, set it to
true.

Personally I always use:

<cfset form[tmpFieldList.id] = tmpFieldList.defaultvalue>
(if I want to insert if it exists or not)

OR

<cfif NOT StructKeyExists(form, tmpFieldList.id)>
<cfset form[tmpFieldList.id] = tmpFieldList.defaultvalue>
</cfif>
Or
<cfparam name="form.#tmpFieldList.id#"
value="#tmpFieldList.defaultvalue#">
(if I only want to insert if it doesn't exist)

Pascal

> -----Original Message-----
> From: Ricardo Russon [mailto:[EMAIL PROTECTED]
> Sent: 15 September 2004 07:28
> To: CF-Talk
> Subject: Re: Struct Insert
>
> Isn't that what the Allow Overwrite is for?
> To overwrite the key if it exists?
>
> Ricardo.
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to