<?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>Please explain how we can use index function with cdt? want explanation with example.</title><link>https://community.appian.com/discussions/f/data/34543/please-explain-how-we-can-use-index-function-with-cdt-want-explanation-with-example</link><description>Hi Team, 
 I understood how index function works, but can someone please write a code(with example) using index function with cdt.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Please explain how we can use index function with cdt? want explanation with example.</title><link>https://community.appian.com/thread/132406?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2024 14:55:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1be392ae-eeef-4233-84a7-023f5cac14c6</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;For readability I continue to recommend people use &amp;quot;property()&amp;quot; when attempting to get a dot property, and reserve &amp;quot;index()&amp;quot; for finding the index (position) of an array.&amp;nbsp; The two functions are interchangeable but that doesn&amp;#39;t mean readability isn&amp;#39;t muddled when one is overused.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Please explain how we can use index function with cdt? want explanation with example.</title><link>https://community.appian.com/thread/132403?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2024 14:27:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:06237d70-8464-402f-9ce0-f0f49b0687af</guid><dc:creator>Kalpesh Gujrati</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/sowmyak2554"&gt;sowmyak2554&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;Lets assume you have 3 column in a CDT &lt;strong&gt;EmployeeData&lt;/strong&gt; as &amp;quot;Name&amp;quot;, &amp;quot;Number&amp;quot;, &amp;quot;City&amp;quot;. now if you want to fetch all the values of City column, you need to use the index function as below:&lt;br /&gt;&lt;br /&gt;Index(Your_CDT,column_Name,default_Value)&lt;/p&gt;
&lt;p&gt;Index(&lt;strong&gt;EmployeeData, &amp;quot;City&amp;quot;, null&lt;/strong&gt;)&lt;/p&gt;
&lt;p&gt;And in case of Record type, code syntax will be same. but you can not index it directly by giving the column name, you need to pass the column name as below&lt;/p&gt;
&lt;p&gt;Index(&lt;strong&gt;EmployeeData, recordType!yourRecordName.fields.yourField, null&lt;/strong&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Please explain how we can use index function with cdt? want explanation with example.</title><link>https://community.appian.com/thread/132389?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2024 13:30:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a282c695-eaff-4f5b-8b81-988652e3ee2e</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a href="/members/sowmyak2554"&gt;sowmyak2554&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/16/pastedimage1712064583222v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/16/pastedimage1712064596067v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please refer the below documentation&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/24.1/fnc_array_index.html"&gt;index()&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Interface Recipes :&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/23.4/recipe-set-the-default-value-of-cdt-fields-based-on-a-user-input.html#expression"&gt;Set the value of a CDT field based on a user input&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>