<?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>Choice values and choice label</title><link>https://community.appian.com/discussions/f/general/24144/choice-values-and-choice-label</link><description>Hi, 
 i have two dropdown field, when i select one some values related to that dropdown will be selected in next dropdown.. but after selecting values in both the dropdown when i try to change the value in first dropdown it throwing the error.. actually</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Choice values and choice label</title><link>https://community.appian.com/thread/93170?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2022 04:48:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ccd8140e-cf4d-490f-8f68-f3c5a4b4e071</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;Great!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Choice values and choice label</title><link>https://community.appian.com/thread/93169?ContentTypeID=1</link><pubDate>Mon, 04 Apr 2022 04:46:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:222f49ee-b715-46d0-9dc0-bf9b3eb5c3c7</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;Hi &amp;nbsp; i have included mentioned code in saveInto instead of value parameter&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; fv!item.collateralCode_int,
                  a!save(
                    fv!item.collateralTypeCode_int,
                    null
                  ),&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Choice values and choice label</title><link>https://community.appian.com/thread/93071?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2022 14:06:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:40ea9c5f-8aeb-483a-b1bd-2eb85b24609b</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;You&amp;#39;d need to show us the saveInto parameters of both dropdowns, particularly the first one as per what Gopalk already said, the first one will need to manually save a blank value into the value being used by the second one, to prevent its value from becoming an invalid selection when the value in the first one is changed.&lt;/p&gt;
&lt;p&gt;Also: I would &lt;em&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;strongly recommend against&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt; using &amp;quot;distinct&amp;quot; funcitons separately on the &amp;quot;choiceLabels&amp;quot; and &amp;quot;choiceValues&amp;quot; arrays like you&amp;#39;re currently doing in the top dropdown - because you will very quickly find yourself in a situation where the dropdown breaks when one of those arrays contains a duplicate and the other one doesn&amp;#39;t, thus causing both lists to be different lengths, which will break the dropdown field.&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1648735374052v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I would replace these with simply this:&lt;br /&gt;&lt;pre class="ui-code" data-mode="java"&gt;choiceLabels: property( ri!crREFCollateral_cdt, &amp;quot;collateralDescription_txt&amp;quot;, {} ),
choiceValues: property( ri!crREFCollateral_cdt, &amp;quot;collateralCode_int&amp;quot;, {} ),&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re worried that ri!crREFCollateral_cdt will contain duplicate entries, you should do the de-duplication on the CDT array as a whole, either at query time or right afterwards (like in a subsequent local variable).&amp;nbsp; I also removed the toUniformString calls as they are almost never necessary in this context.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Choice values and choice label</title><link>https://community.appian.com/thread/93069?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2022 13:40:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:aa79b9ee-b4a8-4179-b1ee-2eecdfcb8cfc</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;HI&amp;nbsp;&lt;a class="internal-link view-user-profile" href="/members/kavyam0002"&gt;kavyamuttur&lt;/a&gt;, To make this working, you would need to make sure you are making second dropdown value null whenever first dropdown&amp;#39;s value changes. So in first doropdown&amp;#39;s saveInto parameter , just make that value null.it should fix your problem then.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>