Question about adding an embedded object from within a PLP...my comments
below describe the phenomenon and ask the question...
<!--- create a new UUID for the new embedded object --->
<CFSET thisobjectid = CreateUUID()>
<!--- create a "virgin" instance of the new object --->
<CFA_contentObjectCreate DATASOURCE="#request.cfa.objectstore.dsn#"
OBJECTID="#thisobjectid#"
TYPEID="D836C1BC-209F-44F0-8AEBD2242750A8F1">
<!--- get a structure that contains the new object --->
<CFA_contentObjectGet DATASOURCE="#request.cfa.objectstore.dsn#"
OBJECTID="#thisobjectid#"
r_stObject="stNewPrompt">
<!--- dump the new object - object looks healthy and has all system
attributes --->
<CFA_DumpObject dataSource="#request.cfa.objectstore.dsn#"
objectID="#thisobjectid#">
<!--- set up a variable to hold the index of the array that'll be used to
hold the new object --->
<CFSET newindex =
ArrayLen(output.aQuestion[form.header.add_new_prompt].aPrompt) + 1>
<!--- establish the new array element as a valid structure --->
<CFSET output.aQuestion[form.header.add_new_prompt].aPrompt[newindex] =
StructNew()>
<!--- copy the new object to its final resting place --->
<CFA_contentObjectCreateEmbeddedFromOriginal
DATASOURCE="#request.cfa.objectstore.dsn#"
stOriginalObject="#stNewPrompt#"
OBJECTID="#output.objectid#.aQuestion[#form.header.add_new_prompt#].aPrompt[
#newindex#]">
<!--- set two user-defined attributes of the new object based on form
variables --->
<CFSET output.aquestion[form.header.add_new_prompt].aprompt[newindex].text =
Form.text>
<CFSET output.aquestion[form.header.add_new_prompt].aprompt[newindex].value
= Form.value>
<!--- dump the contents of the output structure - at this point, the new
object's structure only has two elements, text, and value. What happened to
all of the system attributes?! --->
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.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.