<?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>All selected values must be present in the choiceValues array</title><link>https://community.appian.com/discussions/f/user-interface/25021/all-selected-values-must-be-present-in-the-choicevalues-array</link><description>Hi. I have a dropdown list. It fails when I select one of the values. Here is the code: 
 
 I get the options by query rule and put it into a variable. It looks like good. But it will throw the error when I select the value. 
 
 This is the error message</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: All selected values must be present in the choiceValues array</title><link>https://community.appian.com/thread/115862?ContentTypeID=1</link><pubDate>Sun, 09 Jul 2023 08:45:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8288ecf5-7d8b-4013-89e0-710e8d33f269</guid><dc:creator>Mahalakshmi M</dc:creator><description>&lt;p&gt;rows: {&lt;br /&gt; a!forEach(&lt;br /&gt; items: ri!educationDetails,&lt;br /&gt; expression: a!gridRowLayout(&lt;br /&gt; contents: {&lt;br /&gt; a!dropdownField(&lt;br /&gt; choiceLabels: {local!courseType.displayLabel},&lt;br /&gt; choiceValues: {local!courseType.lookupId},&lt;br /&gt; value: ri!educationDetails.courseType&lt;br /&gt; &lt;br /&gt; ),&lt;br /&gt; a!textField(&lt;br /&gt; value: ri!educationDetails.specification,&lt;br /&gt; saveInto: ri!educationDetails.specification&lt;br /&gt; ),&lt;br /&gt; a!textField(&lt;br /&gt; value: ri!educationDetails.specification,&lt;br /&gt; saveInto: ri!educationDetails.specification&lt;br /&gt; ),&lt;br /&gt; a!dateField(&lt;br /&gt; value: ri!educationDetails.graduatedYear,&lt;br /&gt; saveInto: ri!educationDetails.graduatedYear&lt;br /&gt; ),&lt;br /&gt; a!floatingPointField(&lt;br /&gt; value: ri!educationDetails.passPercentage,&lt;br /&gt; saveInto: ri!educationDetails.passPercentage&lt;br /&gt; )&lt;br /&gt; }&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; },&lt;br /&gt; addRowLink: a!dynamicLink(&lt;br /&gt; label: &amp;quot;Add Education Details&amp;quot;,&lt;br /&gt; saveInto: ri!educationDetails,&lt;br /&gt; value: append(ri!educationDetails,a!map())&lt;br /&gt; )&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I face the same problem , can someone help me here&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: All selected values must be present in the choiceValues array</title><link>https://community.appian.com/thread/115861?ContentTypeID=1</link><pubDate>Sun, 09 Jul 2023 08:40:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a5c2440d-b7eb-4e4a-b722-52e8fe42f94a</guid><dc:creator>Mahalakshmi M</dc:creator><description>&lt;p&gt;can you show the code how it worked&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: All selected values must be present in the choiceValues array</title><link>https://community.appian.com/thread/96905?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 11:24:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:10810cdf-3b3f-41b2-a298-611b4dfea2ef</guid><dc:creator>kevins1191</dc:creator><description>&lt;p&gt;Thanks so much! It works after I used a!map&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: All selected values must be present in the choiceValues array</title><link>https://community.appian.com/thread/96904?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 10:34:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0508d51c-87f0-469a-b0b4-e02809c21d23</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;The problem is that you create your local data using &amp;quot;{}&amp;quot;. Appian looses the data type when accessing the fields. In your situation I recommend to create the dictionaries using the a!map() function and/or apply&amp;nbsp;tostring() on the value and touniformstring() on choicevalues.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: All selected values must be present in the choiceValues array</title><link>https://community.appian.com/thread/96901?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 09:49:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c4c23ba4-78a4-4407-897f-b56aab3ed7c0</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Try using the tostring() in value once. And when providing the choiceLabels and choiceValues, flatten the array once and then wrap the choiceValues in touniformstring() if it is a string or to any other datatype.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: All selected values must be present in the choiceValues array</title><link>https://community.appian.com/thread/96894?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 09:02:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5e8f2d3b-f1e4-4136-827d-7f82946b5665</guid><dc:creator>kevins1191</dc:creator><description>&lt;p&gt;I tried it. But it didn&amp;#39;t work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: All selected values must be present in the choiceValues array</title><link>https://community.appian.com/thread/96892?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 08:57:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a6cb77cc-24be-4b1f-8f03-336de3e8149d</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;The value must match in data type as well. I see a tostring() in your saveInto. Did you try to use a touniformstring to turn the choiceValues into a list of strings?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>