<?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>Casting data Subset to CDT type</title><link>https://community.appian.com/discussions/f/general/13814/casting-data-subset-to-cdt-type</link><description>Hi everyone, 
 I have an interesting issue that is happening just wondering if anyone has ran into that issue before. I have a query rule in which i am getting back a subset of data. When casting that data subset to the cdt type for example, using cast</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Casting data Subset to CDT type</title><link>https://community.appian.com/thread/68054?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2019 12:13:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:af40ef3d-5f5c-4f0e-9091-ddcdc2c78e9e</guid><dc:creator>Victor Bouchery</dc:creator><description>&lt;p&gt;&lt;span&gt;cast(&amp;#39;type!CDTName?list&amp;#39;,local!anytypevalues) works too&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Casting data Subset to CDT type</title><link>https://community.appian.com/thread/62716?ContentTypeID=1</link><pubDate>Fri, 16 Nov 2018 04:02:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5d85db6a-7dc9-45ac-bd89-39a58273e52d</guid><dc:creator>Jerry Sylveus</dc:creator><description>Thanks Shame for your input. :-)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Casting data Subset to CDT type</title><link>https://community.appian.com/thread/62707?ContentTypeID=1</link><pubDate>Thu, 15 Nov 2018 16:55:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7c26c1d0-07aa-43b9-98c4-aedd4fbbfb28</guid><dc:creator>shamec0002</dc:creator><description>Good point, thanks for the correction - I completely overlooked the fact that integer and integer array are different types!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Casting data Subset to CDT type</title><link>https://community.appian.com/thread/62706?ContentTypeID=1</link><pubDate>Thu, 15 Nov 2018 16:48:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f6b4e78c-312b-405f-a342-bef8f3230d8c</guid><dc:creator>Jerry Sylveus</dc:creator><description>The good ol days....&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Casting data Subset to CDT type</title><link>https://community.appian.com/thread/62705?ContentTypeID=1</link><pubDate>Thu, 15 Nov 2018 16:47:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8eab77b1-3106-4161-ba4f-1231e82d35d0</guid><dc:creator>Ashvin Kapur</dc:creator><description>The cast that you&amp;#39;re doing above (cast to type 1), is a cast to a singular number integer. Try cast(101, {&amp;quot;10&amp;quot;, &amp;quot;20&amp;quot;}).&lt;br /&gt;
&lt;br /&gt;
Cast absolutely supports arrays - looping through the data is not the way to go.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Casting data Subset to CDT type</title><link>https://community.appian.com/thread/62704?ContentTypeID=1</link><pubDate>Thu, 15 Nov 2018 16:34:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a78f7a9a-4f79-4c62-b3a5-6c8b7b015f9a</guid><dc:creator>shamec0002</dc:creator><description>I quickly tried this cast(1, {&amp;quot;10&amp;quot;, &amp;quot;20&amp;quot;}) and it only returns 10 so I don&amp;#39;t think the cast function supports array values, you might have to loop through your data cast one at a time.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Casting data Subset to CDT type</title><link>https://community.appian.com/thread/62702?ContentTypeID=1</link><pubDate>Thu, 15 Nov 2018 16:07:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3b8baa7c-c194-46e3-b5e3-d8475c5c4802</guid><dc:creator>Abhishek Gaddam</dc:creator><description>&lt;p&gt;Cheers to the persistent days !! :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Casting data Subset to CDT type</title><link>https://community.appian.com/thread/62700?ContentTypeID=1</link><pubDate>Thu, 15 Nov 2018 15:58:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:26b47c77-430f-494d-b829-1e8f2583d938</guid><dc:creator>Jerry Sylveus</dc:creator><description>Thanks Abhishek&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Casting data Subset to CDT type</title><link>https://community.appian.com/thread/62698?ContentTypeID=1</link><pubDate>Thu, 15 Nov 2018 15:51:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:86008676-2c19-4f73-a425-b82cd7e7d67d</guid><dc:creator>Ashvin Kapur</dc:creator><description>Hey Jerry,&lt;br /&gt;
&lt;br /&gt;
Try cast(typeOf({&amp;#39;type!CDTName&amp;#39;})) instead. You need to cast it to an ARRAY of that type.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Casting data Subset to CDT type</title><link>https://community.appian.com/thread/62697?ContentTypeID=1</link><pubDate>Thu, 15 Nov 2018 15:51:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:135e2e5d-4d53-45e6-a05b-57c2f0dd916a</guid><dc:creator>Abhishek Gaddam</dc:creator><description>&lt;p&gt;Hi Jerry,&lt;br /&gt; &lt;br /&gt; Update the casting to &lt;br /&gt; cast(typeof({&amp;#39;type!CDTNAME&amp;#39;()}), index(expressionRuleWithQueryEntity(),&amp;quot;data&amp;quot;,{})) this way you will be casting the output of the query entity to list of data instead of single datasubset.Using {} near the CDTame makes the whole difference and if you are using a query rule then your casting should be something like this : cast(typeof({&amp;#39;type!CDTNAME&amp;#39;()}), expressionRuleWithQueryEntity()).&lt;br /&gt; &lt;br /&gt; Thanks,&lt;br /&gt; Abhishek gaddam&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>