<?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>Fetch data from a CDT with One-to-Many Relationship</title><link>https://community.appian.com/discussions/f/general/11641/fetch-data-from-a-cdt-with-one-to-many-relationship</link><description>Hi All, 
 I have a CDT where I have a 
 Many to One and 
 One to Many relation ships like 
 {1,A,B,{Many to One },B,C,D, {One to Many} 
 now when I tried fetching the data 
 like rule!xyz().A I am getting result, 
 rule!xyz().ManytoOne I am getting result</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Fetch data from a CDT with One-to-Many Relationship</title><link>https://community.appian.com/thread/51589?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 05:31:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6b6b6beb-df32-42c2-95fd-a989074b022f</guid><dc:creator>Ravi Roshan</dc:creator><description>&lt;p&gt;Hi Harsha,&lt;/p&gt;
&lt;p&gt;First check the configuration in CDT is correct as shown below:&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-discussions-components-files/11/5226.img.PNG"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/5226.img.PNG" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If the configuration is correct, make sure to user index function to fetch the multiple records.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Ravi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fetch data from a CDT with One-to-Many Relationship</title><link>https://community.appian.com/thread/51583?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 04:53:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9ba60ae6-438e-409b-9242-50753ab563d0</guid><dc:creator>Rajat</dc:creator><description>You will have to use indexing as the output is an array od CTD types. Also make sure that the variable in which you want  to store is either Any Type or an array of your CDT type.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fetch data from a CDT with One-to-Many Relationship</title><link>https://community.appian.com/thread/51268?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2018 13:14:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:533f046f-906b-4b8f-bb46-eba1837b5d89</guid><dc:creator>enb</dc:creator><description>This is happening because the output of rule!xyz() is a list of CDTs. The indexing you want will only work on a single CDT. This means you either need to cast the output of xyz to the type of the parent CDT, or use index(rule!xyz(),1).OnetoMany to get the first element.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fetch data from a CDT with One-to-Many Relationship</title><link>https://community.appian.com/thread/51262?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2018 12:33:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4ab0ed8d-3eeb-4b10-ae58-a803ab2c52b7</guid><dc:creator>Vinay Kumar Rai</dc:creator><description>Hi,&lt;br /&gt;
&lt;br /&gt;
did you tried indexing &lt;br /&gt;
example:&lt;br /&gt;
rule!xyz()[1].OnetoMany&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fetch data from a CDT with One-to-Many Relationship</title><link>https://community.appian.com/thread/51256?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2018 11:04:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5146590e-9beb-45e9-82d0-e6f5fc268279</guid><dc:creator>harshav</dc:creator><description>I understand the issue , but not sure of the solution.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>