<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Hi  I have a ReviewDocuments CDT which contains two multi value child CDTs.</title><link>https://community.appian.com/discussions/f/process/6884/hi-i-have-a-reviewdocuments-cdt-which-contains-two-multi-value-child-cdts</link><description>Hi I have a ReviewDocuments CDT which contains two multi value child CDTs. I have a documents array containing 2 documents and a CDT FieldworkAnalyticalReview array with 3 sets of details. Each FieldworkAnalyticalReview needs to be associated with each</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Hi &lt;br /&gt;I have a ReviewDocuments CDT which contains two multi value child CDTs.</title><link>https://community.appian.com/thread/27509?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2016 15:06:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cd747f88-ad3d-44e0-84c2-2dbd9faffc47</guid><dc:creator>suem</dc:creator><description>Hi all, I’m afraid we’ve had to re-work our output CDT to match others in the system so it’s been simplified to the following:&lt;br /&gt;ReviewDocument :-&lt;br /&gt; &lt;br /&gt;The two input CDTs, Documents and Reviews:-&lt;br /&gt; &lt;br /&gt;For each combination of  Review and Document we need to write a ReviewDocument.  &lt;br /&gt;For example if we have 3 rows in Review {“A”,”B”,”C”} and two in Document {1,2} then the output ReviewDocument  will contain 6 rows  ie A1, A2, B1, B2, C1, C2 where  ReviewDocument .farId = gtFieldworkAnalyticalReview.id and ReviewDocument .assignmentDocumentId = gtassignmentDocument.appianDocumentID &lt;br /&gt;&lt;br /&gt;So far we have had little success in nesting the functions and have yet to discover the correct combination which seem endless -&lt;br /&gt;single rule in a script task output, or via the script task inputs or possible using an MNI?&lt;br /&gt;thanks&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi &lt;br /&gt;I have a ReviewDocuments CDT which contains two multi value child CDTs.</title><link>https://community.appian.com/thread/27431?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2016 14:00:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc7b6b9b-87b6-4a1b-bd39-f0595ab53a2d</guid><dc:creator>suem</dc:creator><description>Hi thanks sonalk, Phil. I&amp;#39;ll try out the apply merge approach as it looks like it will do exactly what we want.  Thank you&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi &lt;br /&gt;I have a ReviewDocuments CDT which contains two multi value child CDTs.</title><link>https://community.appian.com/thread/27429?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2016 13:27:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5704ac89-74cf-4258-b32f-91b22054705e</guid><dc:creator>PhilB</dc:creator><description>Bit of a complex one this, but the below pretty much does what you want. Sue - I&amp;#39;ll contact you directly with a more complete solution.&lt;br /&gt;&lt;br /&gt;load(&lt;br /&gt;  local!documents: {&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;},&lt;br /&gt;  local!reviews: {1, 2, 3},&lt;br /&gt;  local!reviewArray: reduce(&lt;br /&gt;    fn!append,&lt;br /&gt;    {},&lt;br /&gt;    apply(&lt;br /&gt;      fn!insert(&lt;br /&gt;        {},&lt;br /&gt;        local!reviews,&lt;br /&gt;        _&lt;br /&gt;      ),&lt;br /&gt;      enumerate(&lt;br /&gt;        length(&lt;br /&gt;          local!documents&lt;br /&gt;        )&lt;br /&gt;      ) + 1&lt;br /&gt;    )&lt;br /&gt;  ),&lt;br /&gt;  local!documentArray: reduce(&lt;br /&gt;    fn!append,&lt;br /&gt;    {},&lt;br /&gt;    apply(&lt;br /&gt;      fn!insert(&lt;br /&gt;        {},&lt;br /&gt;        local!documents,&lt;br /&gt;        _&lt;br /&gt;      ),&lt;br /&gt;      enumerate(&lt;br /&gt;        length(&lt;br /&gt;          local!reviews&lt;br /&gt;        )&lt;br /&gt;      ) + 1&lt;br /&gt;    )&lt;br /&gt;  ),&lt;br /&gt;  apply(&lt;br /&gt;    fn!concat(&lt;br /&gt;      _,&lt;br /&gt;      _&lt;br /&gt;    ),&lt;br /&gt;    merge(&lt;br /&gt;      local!reviewArray,&lt;br /&gt;      local!documentArray&lt;br /&gt;    )&lt;br /&gt;  )&lt;br /&gt;)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi &lt;br /&gt;I have a ReviewDocuments CDT which contains two multi value child CDTs.</title><link>https://community.appian.com/thread/27416?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2016 04:17:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:755b1703-dd27-45ee-9d94-81f5a8238501</guid><dc:creator>sonalk</dc:creator><description>Hi Suem,&lt;br /&gt;Not sure if you have already gone through the below related forum posts link :&lt;br /&gt;&lt;a href="/search?q=OriginalPostID-145331"&gt;forum.appian.com/.../e-145331&lt;/a&gt;&lt;br /&gt;&lt;a href="/search?q=OriginalPostID-190101"&gt;forum.appian.com/.../e-190101&lt;/a&gt;&lt;br /&gt;&lt;a href="/search?q=OriginalPostID-153616"&gt;forum.appian.com/.../e-153616&lt;/a&gt;&lt;br /&gt;Please check if it helps.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi &lt;br /&gt;I have a ReviewDocuments CDT which contains two multi value child CDTs.</title><link>https://community.appian.com/thread/27415?ContentTypeID=1</link><pubDate>Sun, 07 Feb 2016 13:21:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bdecb5e5-6847-4c38-8677-84af305e9f4a</guid><dc:creator>suem</dc:creator><description>We&amp;#39;re having trouble with the syntax required to populate the cdt  for the join table. We&amp;#39;ve tried lots of different combinations but haven&amp;#39;t hit the right combination of functions yet. Any ideas on that please.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi &lt;br /&gt;I have a ReviewDocuments CDT which contains two multi value child CDTs.</title><link>https://community.appian.com/thread/27400?ContentTypeID=1</link><pubDate>Fri, 05 Feb 2016 23:09:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:aef05946-e445-4d10-be74-9bec43a3b2af</guid><dc:creator>jackm829</dc:creator><description>Use a join table between FieldWorkAnalyticalReview and Documents.  This may be called FieldWorkAnalyticalReview_Document.  There will be at least 3 fields - add other metadata fields as you like.  The ID (primary key) of this type, the foreign key ID of the Document, and the foreign key ID of FieldWorkAnalyticalReview.  I would probably recommend not nesting the types - as in the screenshot. Your queries may return more data than you need.  You could just soft-link by ID.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>