<?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>wherecontains not returning the value</title><link>https://community.appian.com/discussions/f/general/23802/wherecontains-not-returning-the-value</link><description>Hi Team, 
 I have a dropdown field in which once user selects the value, based on it the grid below displays the result. 
 a!dropdownField( label: &amp;quot;&amp;quot;, labelPosition: &amp;quot;&amp;quot;, placeholder: &amp;quot;Years Available&amp;quot;, choiceLabels: local!years, choiceValues: local!years</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: wherecontains not returning the value</title><link>https://community.appian.com/thread/91469?ContentTypeID=1</link><pubDate>Wed, 23 Feb 2022 17:10:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:69edb974-800e-468d-ac75-f13d2b0dc8aa</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;What is the expected value of local!GridData prior to a value being selected from the dropdown?&amp;nbsp; Would it contain all values in ri!engatement, or just be empty?&lt;/p&gt;
&lt;p&gt;As Stefan already noted, the result of the whereContains() function simply returns a list of indices.&amp;nbsp; If you want to use that to actually pull data from those indices in an exisitng list, you can pair this with the index() function.&amp;nbsp; I would still suggest doing this within the declaration of local!GridData instead of manually setting it in a SaveInto of a dropdown, though.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you could post a small sample of example code, something which any of us could copy and paste into a blank interface editor without needing your specific CDTs or Rule Inputs, we&amp;#39;d be able to help a lot more easily.&amp;nbsp; If you do, please utilize the &amp;quot;Code Box&amp;quot; functionality: &lt;em&gt;Insert --&amp;gt; Insert Code&lt;/em&gt; in the comment menu.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: wherecontains not returning the value</title><link>https://community.appian.com/thread/91468?ContentTypeID=1</link><pubDate>Wed, 23 Feb 2022 16:51:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:617bb716-4f31-4dbc-9f9d-ed93082e8a70</guid><dc:creator>ananditab806196</dc:creator><description>&lt;p&gt;1.) ri!engagement is not empty. Its holds a dictionary.&lt;/p&gt;
&lt;p&gt;2.) yes the value is within the array of &amp;quot;client years&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: wherecontains not returning the value</title><link>https://community.appian.com/thread/91467?ContentTypeID=1</link><pubDate>Wed, 23 Feb 2022 16:49:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6d68f6af-a73e-4046-96fd-cef0d744fa84</guid><dc:creator>ananditab806196</dc:creator><description>&lt;p&gt;The desired output is a list of engagements which has the selectedYear from the dropdown.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: wherecontains not returning the value</title><link>https://community.appian.com/thread/91463?ContentTypeID=1</link><pubDate>Wed, 23 Feb 2022 16:29:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f69edbc2-6ff2-48f8-be8c-52ad6eb99516</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Additionally, I wouldn&amp;#39;t recommend &amp;quot;hardcoding&amp;quot; (as it were) the desired output value of a filter into its SaveInto.&amp;nbsp; That logic should be handled dynamically in the relevant Local Variables (and/or queries).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: wherecontains not returning the value</title><link>https://community.appian.com/thread/91462?ContentTypeID=1</link><pubDate>Wed, 23 Feb 2022 16:23:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8feb3d16-08c2-43dd-858d-b5decbc12930</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;valid point. local!Griddata shouln&amp;#39;t be an index usually&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: wherecontains not returning the value</title><link>https://community.appian.com/thread/91461?ContentTypeID=1</link><pubDate>Wed, 23 Feb 2022 16:22:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5665475d-2211-4f0e-b446-6f6d20199d04</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;What is the intended output? wherecontains() gives you the indexes of values in a list.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: wherecontains not returning the value</title><link>https://community.appian.com/thread/91460?ContentTypeID=1</link><pubDate>Wed, 23 Feb 2022 16:22:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e6f1aa18-5837-480d-9033-84ba058f5256</guid><dc:creator>Richard Michaelis</dc:creator><description>&lt;p&gt;Hello ananditab,&lt;br /&gt;1.) is ri!engagement null or empty?&lt;br /&gt;2.)is the value selectYear within the array of&amp;nbsp; &amp;quot;client years&amp;quot;?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>