<?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 clean a query?</title><link>https://community.appian.com/discussions/f/data/19057/how-to-clean-a-query</link><description>Hello again, 
 
 you guys were so awesome last time I decided I would take a chance again and reach back out to see if you can help me again, 
 
 I am attempting to grab just the actual data from my query, 
 
 for example my list of 50 states returns</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: how to clean a query?</title><link>https://community.appian.com/thread/74738?ContentTypeID=1</link><pubDate>Tue, 16 Jun 2020 11:55:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:59dc90f7-3043-48af-86ad-bd99500f8a56</guid><dc:creator>kevinr0001</dc:creator><description>&lt;p&gt;Thanks TJ!&lt;/p&gt;
&lt;p&gt;&lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f60d.svg" title="Heart eyes"&gt;&amp;#x1f60d;&lt;/span&gt;&lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f600.svg" title="Grinning"&gt;&amp;#x1f600;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to clean a query?</title><link>https://community.appian.com/thread/74731?ContentTypeID=1</link><pubDate>Mon, 15 Jun 2020 23:58:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e4880995-6c3f-4247-a97d-5a82e72559ac</guid><dc:creator>TJ</dc:creator><description>&lt;p&gt;Hi Kevin,&lt;/p&gt;
&lt;p&gt;If the output of your query is a list of dictionary, then all you need to use is an index function.&lt;br /&gt;Please refer to the following code and try to run it in an expression rule.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;with(&lt;br /&gt; local!dict:{&lt;br /&gt; {stateAbrv:&amp;quot;AK&amp;quot;},&lt;br /&gt; {stateAbrv:&amp;quot;AZ&amp;quot;},&lt;br /&gt; {stateAbrv:&amp;quot;AR&amp;quot;},&lt;br /&gt; {stateAbrv:&amp;quot;CA&amp;quot;},&lt;br /&gt; {stateAbrv:&amp;quot;CZ&amp;quot;},&lt;br /&gt; {stateAbrv:&amp;quot;CO&amp;quot;},&lt;br /&gt; {stateAbrv:&amp;quot;CT&amp;quot;},&lt;br /&gt; {stateAbrv:&amp;quot;DE&amp;quot;},&lt;br /&gt; {stateAbrv:&amp;quot;DC&amp;quot;},&lt;br /&gt; {stateAbrv:&amp;quot;FL&amp;quot;}&lt;br /&gt; },&lt;br /&gt; fn!index(local!dict,&amp;quot;stateAbrv&amp;quot;,null)&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>