Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How to retrieve replicant index in DataDeploy conf
sabih
Can anyone tell me how to retrieve the replicant index from a DCR and pass it to Data Deploy Config file?
e.g DCR
<container name="questions" location="questions" max="unbounded">
<label>Questions</label>
<item name="question" pathid="question">
<label>Question</label>
<text size="50" required="f" />
</item>
</container>
e.g Data Deploy Config
<attrmap>
...
<column name="question" data-type="VARCHAR(255)" allows-null="yes" is-url="no" value-from-field="poll/0/questions/[0-10]/question/0" />
<column name="question_index" data-type="INT allows-null="yes" is-url="no" value-from-field="poll/0/questions/???????" />
</attrmap>
Find more posts tagged with
Comments
Migrateduser
it should be passed automatically if you set up the replicants correctly in your DCRs. you cannot embed replicants in the container node and expect to generate the config file correctly, as this currently isnt supported. gg iw!
<item name="file_type">
<label>File Type</label>
<replicant default="0" min="1" max="7" combination="and">
<!-- LINK TYPE (ITEM) -->
<item name="file_format" rowcontinue="f">
<label>File Format</label>
<description>Enter the File Format of your form.</description>
<database deploy-column="t" data-type="VARCHAR2(255)" />
<select multiple="f" required="t">
<option label="PDF" value="PDF"/>
<option label="PowerPoint" value="PowerPoint" />
<option label="Excel" value="Excel" />
<option label="Word" value="Word" />
<option label="MP3" value="MP3" />
<option label="Web Page" value="Web Page" />
<option label="Interactive PDF" value="Interactive PDF" />
</select>
</item>
etc etc...
-----------------------------------------------------
<group name="file_type" root-group="no">
<attrmap>
<column name="content_id" data-type="NUMBER" value-from-field="content_id" allows-null="no" is-url="no"/>
<column name="rep_order" data-type="NUMBER" value-from-field="not-used" allows-null="yes" replicant-order-column="yes"/>
<column name="file_format" data-type="VARCHAR2(255)" value-from-field="file_type/[0-6]/file_format" is-replicant="yes" allows-null="yes" is-url="no"/>
<column name="daf" data-type="VARCHAR2(300)" value-from-field="file_type/[0-6]/daf" is-replicant="yes" allows-null="yes" is-url="no"/>
</attrmap>
<keys>
<primary-key>
<key-column name="content_id"/>
<key-column name="rep_order"/>
</primary-key>
<foreign-key parent-group="forms">
<column-pair parent-column="content_id" child-column="content_id"/>
</foreign-key>
</keys>
</group>
WoW Profile
TS 6.5 SP1
OD 6.0.2
sabih
I am getting the following error:
Root cause:
java.lang.IllegalArgumentException: Unknown item child replicant
I am on Teamsite 6.5 Solaris/
Migrateduser
when are you getting this error? when the DCT loads? or on a save? how are you generating your dbschema.cfg file?
WoW Profile
TS 6.5 SP1
OD 6.0.2 SP1
sabih
I am getting the error at the time of creating a new Form. I am using iwsyncdb -dbschemagen to generate the schema but its not even getting to that point. I did the following update to the DCT and it created the schema just fine. What I am wondering is would I still be able to access the container index using this config.
<container name="questions" combination="and" max="unbounded">
<label>Questions</label>
<item name="image" pathid="image">
<label>Image</label>
<browser size="50" required="f" />
</item>
<item name="question" pathid="question">
<label>Question</label>
<text size="50" required="f" />
<database deploy-column="t" data-type="VARCHAR2(1000)" />
</item>
<container name="answers" combination="and" max="unbounded">
<label>Answers</label>
<item name="image" pathid="image">
<label>Image</label>
<browser size="50" required="f" />
</item>
<item name="answer" pathid="answer">
<label>Answer</label>
<text size="50" required="f" />
<database deploy-column="t" data-type="VARCHAR2(1000)" />
</item>
<item name="correct" pathid="correct">
<label>Correct</label>
<select >
<option label='Please Select' value='' selected='t'/>
<option label='Yes' value='Yes'/>
<option label='No' value='No'/>
</select>
<database deploy-column="t" />
</item>
</container>
</container>
Migrateduser
im really not sure why are worried about container indexes when the form doesnt load w/o errors...
maybe model your containers moreso like in the docs?
<container combination="and" name="section" min="0"
max="unbounded">
maybe try without the unbounded (just use a high#)? does the form work correctly if you remove the nested replicant?
WoW Profile
TS 6.5 SP1
OD 6.0.2 SP1
sabih
I have made it work. Using OnReplicantAdd event I add the index to a hidden field and then resequencing the index onSave event incase if a replicant is deleted.