<?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>Dropdown with an array</title><link>https://community.appian.com/discussions/f/user-interface/24369/dropdown-with-an-array</link><description>Hi, 
 When I am trying to assign an array to a local variable and use the same for dropdown choiceLabels and choiceValues, I am getting an error. 
 Any idea why I am getting this error.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Dropdown with an array</title><link>https://community.appian.com/thread/94061?ContentTypeID=1</link><pubDate>Sat, 23 Apr 2022 21:30:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d748dc97-0bca-43eb-a617-68c9b0692505</guid><dc:creator>Hari Kishore Reddy</dc:creator><description>&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dropdown with an array</title><link>https://community.appian.com/thread/94060?ContentTypeID=1</link><pubDate>Sat, 23 Apr 2022 21:30:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ee454f00-f427-44b6-abca-8f18f7f45700</guid><dc:creator>Hari Kishore Reddy</dc:creator><description>&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dropdown with an array</title><link>https://community.appian.com/thread/94055?ContentTypeID=1</link><pubDate>Sat, 23 Apr 2022 12:27:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8fe41224-c25a-4a46-860f-4009d4a9d37d</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Use the append or flatten function instead.&amp;nbsp;&lt;br /&gt;Flatten is used to flat a nested array. Append, as the name suggests, is used to append a variable to an array. Using merge will create a nested array that will cause problems.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dropdown with an array</title><link>https://community.appian.com/thread/94051?ContentTypeID=1</link><pubDate>Sat, 23 Apr 2022 02:48:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9c1e67e3-a88b-4440-addc-69b146ca4859</guid><dc:creator>Naresh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t use merge function to append two arrays. Review Appian documentation if you are not sure about that function. I am posting a sample code here, it will work for your case.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!reviewOptionLable1AI: {&amp;quot;Additional Info Required&amp;quot;},
  local!reviewOptionValueAI: {&amp;quot;AIR&amp;quot;},
  local!reviewOptionLabelCancel: {&amp;quot;Cancelled&amp;quot;},
  local!reviewOptionValueCancel: {&amp;quot;CSED&amp;quot;},
  local!reviewOptionLable: {local!reviewOptionLable1AI, local!reviewOptionLabelCancel},
  local!reviewOptionValue: {local!reviewOptionValueAI, local!reviewOptionValueCancel},
  a!formLayout(
    contents: {
      a!dropdownField(
        label: &amp;quot;Review Options&amp;quot;,
        placeholder: &amp;quot;--- Select a Review Option ---&amp;quot;,
        choiceLabels: local!reviewOptionLable,
        choiceValues: local!reviewOptionValue,
        value: &amp;quot;&amp;quot;,/*your rule input*/
        saveInto: {
          /*save back to your rule input*/
        }
      )
    }
  )
)&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>