Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
Nested Replicants
System
I want to have a replicant within a replicant. I can very well implement in the datacapture. But my problem is getting the correct value of the sort order.
<!-- Section -->
<item name="Sections">
<replicant default="1" max="10">
<item name="sectionHeading">
<label>Section Heading</label>
<description>Enter the section heading here</description>
<database data-type="NVARCHAR(100)" />
<text size="62" maxlength="100" ></text>
</item>
<item name="sectionBody">
<label>Section Body</label>
<description>Enter the section body here</description>
<database data-type="NTEXT" />
<textarea rows="10" cols="50" wrap="physical" required="f" external-editor="visualformat"></textarea>
</item>
<item name="uploadFiles">
<replicant default="1" max="5">
<item name="uploadFile">
<label>File to upload</label>
<text required="f" size="40" maxlength="255">
<cgi-callout label="Upload File..." url="/path/callout_fileSelect.ipl?file_dir=/resources/PdfForms/&extensions_regex=(.*)$" />
</text>
<database data-type="VARCHAR(255)" />
</item>
</replicant>
</item>
</replicant>
</item>
I have to populate these values in two tables.
Table one: SecSortOrder(of the outermost replicant) and Path - PK
Table Two: SecSortOrder (outmost), uploadfileSortOrder(inner) and path as PK
Example: Section 1
File upload 1
File upload 2
Section 2
File upload 1
File upload 2
File upload 3
Ideally I should have 2 records in table one with sort order as 1, & 2 resp.
And five records in table 2 as:
1, 1, fileuploadpath
1, 2, fileuploadpath
2, 1, fileuploadpath
2, 2, fileuploadpath
2, 3, fileuploadpath
The code in my dd_.cfg is
<group name = "FileUploadSection" table="TestTab1" root-group="no">
<attrmap>
<column name="path" data-type="varchar(255)" value-from-field="path"/>
<column name="sortOrder" data-type="integer" value-from-field="Sections/[0-10]/" allows-null="no" replicant-order-column="yes"/>
<column name="fileSortOrder" data-type="integer" value-from-field="Sections/[0-10]/UploadFiles/[0-5]/" allows-null="no" replicant-order-column="yes"/>
<column name="filePath" data-type="varchar(255)" value-from-field="Sections/[0-10]/UploadFiles/[0-5]/uploadFile" is-replicant="yes" allows-null="yes"/>
</attrmap>
<keys>
<primary-key>
<key-column name="path"/>
<key-column name="sortOrder"/>
<key-column name="fileSortOrder"/>
</primary-key>
</keys>
</group>
But I am not able to capture that in the _dd.cfg. Any ideas what needs to change in the _dd.cfg code?
Find more posts tagged with
Comments
There are no comments yet