<?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 create a local variable of CDT type as array?</title><link>https://community.appian.com/discussions/f/best-practices/19849/how-to-create-a-local-variable-of-cdt-type-as-array</link><description>How can I make below local variable of cdt type as an array ?? 
 
 local!samtask: &amp;#39;type!{urn:com:appian:types}MPPTABSAM_Task&amp;#39;()</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to create a local variable of CDT type as array?</title><link>https://community.appian.com/thread/77559?ContentTypeID=1</link><pubDate>Tue, 03 Nov 2020 07:56:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cede8ee8-5ec9-4994-9cea-7f8266f47e97</guid><dc:creator>arshbirs0001</dc:creator><description>&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to create a local variable of CDT type as array?</title><link>https://community.appian.com/thread/77558?ContentTypeID=1</link><pubDate>Tue, 03 Nov 2020 06:40:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c2f2f60c-52e6-4881-956b-c26e0aa747ee</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Just like any other array. See&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/20.3/Expressions.html#arrays"&gt;https://docs.appian.com/suite/help/20.3/Expressions.html#arrays&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;local!samtask: {
    &amp;#39;type!{urn:com:appian:types}MPPTABSAM_Task&amp;#39;(),
    &amp;#39;type!{urn:com:appian:types}MPPTABSAM_Task&amp;#39;(),
    &amp;#39;type!{urn:com:appian:types}MPPTABSAM_Task&amp;#39;()
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;For a dynamic length you can use foreach() and enumerate() or the repeat() function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>