<?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>selected index not valid in dropdown</title><link>https://community.appian.com/discussions/f/user-interface/20705/selected-index-not-valid-in-dropdown</link><description>i everyone , 
 i am pratik and i am trying to build one form where user can search the candidate from dropdown which is comes throw database using query rule. and on selection of that choice i want to display the all information of that perticular person</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: selected index not valid in dropdown</title><link>https://community.appian.com/thread/80717?ContentTypeID=1</link><pubDate>Sat, 03 Apr 2021 15:38:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1f78dd8c-03d1-4f7c-aa60-5bd6504da4be</guid><dc:creator>pratiks0003</dc:creator><description>&lt;p&gt;ok thanks selvakumar ,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i will be try this ones&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: selected index not valid in dropdown</title><link>https://community.appian.com/thread/80677?ContentTypeID=1</link><pubDate>Fri, 02 Apr 2021 10:53:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ea885fb9-d04b-4e66-8e69-07c181908a9e</guid><dc:creator>Selvakumar Kumarasamy</dc:creator><description>&lt;p&gt;&lt;a href="/members/pratiks0003"&gt;pratiks0003&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think the issue is in the index logic that you have done. From the code,&amp;nbsp;&lt;strong&gt;local!availableCandidates.id[local!selectedCandidate]&amp;nbsp;&lt;/strong&gt;- seems like you&amp;#39;re trying to index based on the variable&amp;nbsp;local!selectedCandidate, but it is wrong. You&amp;#39;re trying to index based on a text value.&lt;/p&gt;
&lt;p&gt;On analyzing your code, I could infer that&amp;nbsp;&lt;strong&gt;local!selectedIndex&lt;/strong&gt; is the variable that contains the index position. So, if you replace local!&lt;span&gt;selectedCandidate by&amp;nbsp;local!selectedIndex, then this will work.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also, I prefer to used &lt;strong&gt;index()&lt;/strong&gt; function as a best practice to avoid errors.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>