Hi there.

This little code below updates three propertys in a type, all three
propertys are arrays. My code works, but have I done it like it?s supposed
to be done? I havn?t find a way to just update for example array-element 2
in the art_typ property.

<cfset tmp_mellanrubrik = ArrayNew(1)>
<cfset tmp_brodtext = ArrayNew(1)>
<cfset tmp_typ = ArrayNew(1)>

<cfloop from="1" to="#ArrayLen(Artikel.art_typ)#" step="1" index="i">
        <cfif editor.SparaStycke NEQ i>
                <cfset tmp_mellanrubrik[i] = "#Artikel.art_mellanrubrik[i]#">
                <cfset tmp_brodtext[i] = "#Artikel.art_brodtext[i]#">
                <cfset tmp_typ[i] = "#Artikel.art_typ[i]#">
        <cfelse>
                <cfset tmp_mellanrubrik[editor.SparaStycke] = "#form.mellanrubrik#">
                <cfset tmp_brodtext[editor.SparaStycke] = "#form.brodtext#">
                <cfset tmp_typ[editor.SparaStycke] = "#form.styp#">
        </cfif>

</cfloop>

<cfa_contentObjectData datasource="#attributes.datasource#"
objectid="#Artikel.objectID#">
        <cfa_contentObjectProperty name="art_mellanrubrik"
value="#tmp_mellanrubrik#">
        <cfa_contentObjectProperty name="art_brodtext" value="#tmp_brodtext#">
        <cfa_contentObjectProperty name="art_typ" value="#tmp_typ#">
</cfa_contentObjectData>

// Daniel


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to