<?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/27216/all-selected-values-must-be-present-in-the-choicevalues-array</link><description>Hi, Dropdown field is getting error, can anyone provide inputs to resolve.</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/106815?ContentTypeID=1</link><pubDate>Tue, 17 Jan 2023 16:07:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ff1d3ae2-39bd-432b-990e-7c8a3b004edc</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;Change line 247 from count( to length(.&amp;nbsp; Count will include nulls, and so could be potentially a positive value when it should return 0 and make the if statement false.&amp;nbsp; I bet it&amp;#39;s not making the if statement false when you have 0 records.&amp;nbsp; Especially since your index function on line 250 returns a default of the empty set.&amp;nbsp; I&amp;#39;d change that to return null by default on line 250; null of type integer and {} aren&amp;#39;t even the same type, and could cause probs like what you&amp;#39;re seeing.&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/106796?ContentTypeID=1</link><pubDate>Tue, 17 Jan 2023 08:15:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:34c90708-28e4-45de-8087-050b2562ae7b</guid><dc:creator>aryan</dc:creator><description>&lt;p&gt;I think the value initially is not null but rather a string with only space. I tried the same and getting the same error.&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/106795?ContentTypeID=1</link><pubDate>Tue, 17 Jan 2023 08:00:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2d044ee2-3308-4c4a-bbed-7e41d2ff4229</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Dropdown works with a null. How else do you expect a dropdown to show a placeholder or act when no value is selected?&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/106794?ContentTypeID=1</link><pubDate>Tue, 17 Jan 2023 07:58:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5dea0627-8ce8-4171-93a9-30fa891a7365</guid><dc:creator>aryan</dc:creator><description>&lt;p&gt;The initial value of the dropdownField is &amp;quot;null&amp;quot; and there is no &amp;quot;null&amp;quot; in the &amp;quot;choiceValues&amp;quot;. That is why it is giving errors. Try to give an appropriate condition in the value attribute of your dropdownField.&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/106793?ContentTypeID=1</link><pubDate>Tue, 17 Jan 2023 07:25:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:00026cc3-f3a6-4550-a510-8438e2d388c1</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Please use the insert code feature to make it more readable and indented.&amp;nbsp;&lt;br /&gt;Now coming to error, the dropdown works in a way where the selected item has to be in the list of items that can be selected (choiceValues) else Appian will error out.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now you will have to find that why the value is coming as a space and not something from the choiceValues. Also, one more thing I noticed in your code is that the dropdown &amp;quot;Type of the user&amp;quot; has a weird value condition. You have wrapped the value in count() function but never compared it to anything. In this case, it will give you true for every non zero value and false if it returns 0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>