<?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>How to map CDT</title><link>https://community.appian.com/discussions/f/data/11683/how-to-map-cdt</link><description>Hello, 
 
 I have a requirement where I need to map data in one CDT to another. The two CDT&amp;#39;s are as below 
 
 DS_SeparatedData which includes FieldIdentifier,DataValue,Datacaption and Keyidentifier - These values are coming from database, Now what I</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/52142?ContentTypeID=1</link><pubDate>Thu, 01 Feb 2018 05:49:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:85217436-8f34-4f2c-b91e-a4d9337dc56f</guid><dc:creator>smriti p0001</dc:creator><description>you can simply set value of age from cdtB , like CDT A. Age = CDT b.Age in loop. so the final CDT will have all three fields with updated value&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51524?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 14:30:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8d59d65e-4473-4207-8660-f54363c3a095</guid><dc:creator>viveku3486</dc:creator><description>Hey Chandu,&lt;br /&gt;
&lt;br /&gt;
I thought of DB View but don&amp;#39;t you think it will become a long process?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51523?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 14:28:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d5cd1738-2481-4158-a168-c4e5f654a708</guid><dc:creator>viveku3486</dc:creator><description>Thanks Mohamed, It worked. I really appreciate your time and efforts. Thank you once again :)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51522?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 13:51:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b7139982-b47c-442a-9b9d-6c9df7889f34</guid><dc:creator>chandu</dc:creator><description>Hi Vivek, Does DB View will not be good to suffice your requirement?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51521?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 13:50:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:17381b0c-1a4f-45c2-a402-5889fefe6c86</guid><dc:creator>mohamedt808</dc:creator><description>Try this ,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
a!forEach(&lt;br /&gt;
items:ri!SeparatedData_CDT,&lt;br /&gt;
expression:{&amp;#39;type!{urn:com:appian:types}WebLaunchParameters&amp;#39;(&lt;br /&gt;
ProcessDataCaption: ri!SeparatedData_CDT[fv!index].ProcessDataCaption,&lt;br /&gt;
FieldIdentifier: ri!SeparatedData_CDT[fv!index].FieldIdentifier,&lt;br /&gt;
ProcessDataLaunch: ri!SeparatedData_CDT[fv!index].ProcessDataLaunch,&lt;br /&gt;
ProcessDataOptional: ri!SeparatedData_CDT[fv!index].ProcessDataOptional,&lt;br /&gt;
ProcessDataValue: index(ri!VD_Datasubset.ProcessDataValue,wherecontains(ri!SeparatedData_CDT[fv!index].FieldIdentifier,ri!VD_Datasubset.FieldIdentifier),&amp;quot;&amp;quot;),&lt;br /&gt;
KeyFormAttributeType: ri!SeparatedData_CDT[fv!index].KeyFormAttributeType,&lt;br /&gt;
FormAttributeValue: ri!SeparatedData_CDT[fv!index].FormAttributeValue&lt;br /&gt;
)}&lt;br /&gt;
)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51520?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 13:47:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c1bbecab-2fdb-41b0-bb89-ccbca8994338</guid><dc:creator>viveku3486</dc:creator><description>a!forEach(&lt;br /&gt;
items:ri!SeparatedData_CDT,&lt;br /&gt;
expression:{&amp;#39;type!{urn:com:appian:types}WebLaunchParameters&amp;#39;(&lt;br /&gt;
ProcessDataCaption: ri!SeparatedData_CDT[fv!index].ProcessDataCaption,&lt;br /&gt;
FieldIdentifier: ri!SeparatedData_CDT[fv!index].FieldIdentifier,&lt;br /&gt;
ProcessDataLaunch: ri!SeparatedData_CDT[fv!index].ProcessDataLaunch,&lt;br /&gt;
ProcessDataOptional: ri!SeparatedData_CDT[fv!index].ProcessDataOptional,&lt;br /&gt;
ProcessDataValue: index(ri!VD_Datasubset,wherecontains(ri!SeparatedData_CDT[fv!index].FieldIdentifier,ri!VD_Datasubset.FieldIdentifier),&amp;quot;&amp;quot;),&lt;br /&gt;
KeyFormAttributeType: ri!SeparatedData_CDT[fv!index].KeyFormAttributeType,&lt;br /&gt;
FormAttributeValue: ri!SeparatedData_CDT[fv!index].FormAttributeValue&lt;br /&gt;
)}&lt;br /&gt;
)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51517?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 13:42:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6d822f6e-a0ce-426e-b05b-5ae808ee94f2</guid><dc:creator>mohamedt808</dc:creator><description>Can you paste the rule logic you have writen here.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51516?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 13:37:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d6615363-d3aa-454d-bce6-1b5ea67125c4</guid><dc:creator>viveku3486</dc:creator><description>You mean one value at a time? I&amp;#39;m doing it like rule!MapManualValueToCDT(pv!firstCDT,pv!secondCDT) and then inside the rule i&amp;#39;m implementing your logic&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51515?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 13:32:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:480d2b96-be5a-434c-b169-be092e5735b2</guid><dc:creator>mohamedt808</dc:creator><description>I am guessing that while trying it you have given the whole CDT as first parameter for index function , try specifying the parameter needed with dot notation .&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51512?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 13:03:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:afe5a045-b5d9-437d-bb4c-ff1539f82a92</guid><dc:creator>viveku3486</dc:creator><description>Hello Mohamed,&lt;br /&gt;
&lt;br /&gt;
I tried your logic but its giving me error i.e  Invalid index: Cannot index type Number (Integer) into type CDT2) (Data Outputs)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51493?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 11:29:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:545498ab-9cd5-46c1-a9f4-f7eb1418ff02</guid><dc:creator>mohamedt808</dc:creator><description>As per what you are saying, you can use a simple index function and store these value in the actual CDT.Lets Say variable &amp;quot;a&amp;quot; (DS_SeparatedData?list) and Variable &amp;quot;b&amp;quot; (VD_SeparatedData?list)  then store the result of following in variable a.&lt;br /&gt;
&lt;br /&gt;
a!forEach(&lt;br /&gt;
items:ri!a,&lt;br /&gt;
expression:{&amp;#39;type!{urn:com:appian:types}DS_SeparatedData&amp;#39;(&lt;br /&gt;
  Datacaption:ri!a[fv!index].Datacaption,&lt;br /&gt;
  KeyIdentifier:ri!a[fv!index].KeyIdentifier,&lt;br /&gt;
 DataValue: index(ri!b.DataValue,wherecontains(ri!a[fv!index].FieldIdentifier,ri!b.FieldIdentifier),&amp;quot;&amp;quot;),&lt;br /&gt;
 FieldIdentifier:ri!a[fv!index].FieldIdentifier)}&lt;br /&gt;
)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51489?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 11:07:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ba849613-f4b8-4058-b82e-d371030b7cca</guid><dc:creator>viveku3486</dc:creator><description>Hey Alok,&lt;br /&gt;
&lt;br /&gt;
I don&amp;#39;t want to map the data between two different CDT&amp;#39;s. I want to map data between two variables of same CDT. Here my variables are different but their CDT is same. for eg, CDT A is one variable of type &amp;#39;Employee&amp;#39; and CDT B is another variable of same type &amp;#39;Employee&amp;#39;.  Only difference is the number of properties they hold. In this case lets say  CDT &amp;#39;Employee&amp;#39; have 3 fields than variable CDT A contains all the three columns and CDT B contains only two columns. So whatever will be the value inside variable CDT B, I want to make the changes in CDT A.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51487?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 10:57:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f47b0cc1-81e6-4798-9c76-03a6b644593d</guid><dc:creator>viveku3486</dc:creator><description>Yes these two CDT&amp;#39;s are multiple. Let me give a quick example&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CDT A:[Name=abc,Age=,Gender=Male],[Name=pqr,Age=,Gender=Female],[Name=xyz,Age=,Gender=Male] and so on.&lt;br /&gt;
&lt;br /&gt;
Similarly CDT B contains&lt;br /&gt;
CDT B:[Name=abc,Age:40],[Name=jkl,Age:60],[Name=xyz,Age:20]&lt;br /&gt;
&lt;br /&gt;
As You can CDT A is my original CDT which contain all the columns whereas CDT B contains only 2 columns i.e Name and age. In CDT A you can see that &amp;quot;Age&amp;quot; property is blank. So what I need is that I need to update the values in CDT A with the matching values available in CDT B. My Final output would be something like&lt;br /&gt;
&lt;br /&gt;
[Name=abc,Age=40,Gender=Male],[Name=pqr,Age={Blank as no record for &amp;quot;pqr&amp;quot; is available in CDT B},Gender=Female],[Name=xyz,Age=20,Gender=Male] and so on.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51486?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 10:54:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8ed1985d-f6d3-45b5-ab13-843486fa5f08</guid><dc:creator>aloks0189</dc:creator><description>type!B is nothing but, will be used to form a the original variable.  Let&amp;#39;s say In your case actual cdt in which you want to copy the data, if its name is Employee then you could declare it as follows: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
type!Employee(&lt;br /&gt;
empName: ri!otherCDT.empName,&lt;br /&gt;
email: &amp;quot;abc@test.com&amp;quot;,&lt;br /&gt;
identifier: ri!otherCDT.eventIdentifier&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Assume empName, email &amp;amp; identifier are the properties of your Target/Actual CDT where as empName, eventIdentifier is the property of your parameterized CDT which has the value&lt;br /&gt;
&lt;br /&gt;
Here type!Employee() will prepare a CDT object of type Employee&lt;br /&gt;
&lt;br /&gt;
Also, if you want to generate array of CDT then you need to make the use of looping functions such as: a!forEach(), apply() etc..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hope this will help you.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51484?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 10:45:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e22e4a92-7a33-4d2e-9f74-ca0bbc2d14e2</guid><dc:creator>mohamedt808</dc:creator><description>Are these two CDT&amp;#39;s multiple??&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51483?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 10:30:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b4922a02-1295-496d-85e6-77420909bcc4</guid><dc:creator>viveku3486</dc:creator><description>Hey Alok,&lt;br /&gt;
&lt;br /&gt;
How this logic will take effect a change in original variable? We are nowhere passing the original variable&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51480?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 09:51:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:be4f7059-ed85-404e-b3ed-1c38081b393d</guid><dc:creator>viveku3486</dc:creator><description>Let me try this between thanks for all your time and efforts.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51478?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 09:47:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c575f21a-d9d6-4249-9bca-5e934b2bc197</guid><dc:creator>aloks0189</dc:creator><description>The parameter should be the CDT which is having the values, from which you want to copy the values to another CDT.&lt;br /&gt;
&lt;br /&gt;
Let&amp;#39;s say CDT A is having value which you want to copy into CDT B, then CDT A should be parameter and inside rule you use &lt;br /&gt;
&lt;br /&gt;
type!B(&lt;br /&gt;
FieldIdentifier: ri!B.FieldIdentifier,&lt;br /&gt;
DataValue: something&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
I assume FieldIdentifier and DataValue along with other properties(optional) are the property of your CDT B&lt;br /&gt;
&lt;br /&gt;
Hope this will help you&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51476?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 09:38:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:673cb5f1-8b27-41a6-819d-546c76a1be17</guid><dc:creator>viveku3486</dc:creator><description>Hey Alok, Thanks for quick reply. The parameter which I will pass in expression rule should be my original CDT or the one where updated values are stored? Can you refer the above mentioned variables and implement it in your logic? That will clarify my all doubts. Thanks in advance&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to map CDT</title><link>https://community.appian.com/thread/51475?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 09:33:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0530a387-1512-42aa-9c15-4e1f7fb7675c</guid><dc:creator>aloks0189</dc:creator><description>Hi   for your requirement, you can create an expression rule, which will have your CDT as input parameter (which is having the value).&lt;br /&gt;
&lt;br /&gt;
Now use type!yourCDT(&lt;br /&gt;
All property of your desired CDT: required value&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
Where type!yourCDT() is of your desired type CDT which you want to get as an output/response.&lt;br /&gt;
&lt;br /&gt;
This should do your job.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>