<?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>Cascade Dropdown</title><link>https://community.appian.com/discussions/f/user-interface/17171/cascade-dropdown</link><description>Hello All, 
 
 I have a requirement where i have to create two dropdown fields but second dropdown will depend upon first. Suppose user selects one option from the first dropdown then according to that option second dropdown show options. one more thing</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Cascade Dropdown</title><link>https://community.appian.com/thread/67758?ContentTypeID=1</link><pubDate>Fri, 28 Jun 2019 01:29:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:48e2f831-5136-481b-9457-0cf534bb1353</guid><dc:creator>gopalk0002</dc:creator><description>&lt;p&gt;Thanks &lt;a href="/members/ekanshj"&gt;ekanshj&lt;/a&gt; I configured in that way only.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cascade Dropdown</title><link>https://community.appian.com/thread/67757?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 23:41:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b6092760-8472-43f3-ac45-c6620fa59247</guid><dc:creator>ekanshj</dc:creator><description>&lt;p&gt;yes this has to be dynamic in nature based on selection for that either you have to use database queries where based on your selection it will pass as input and fetch the relevant options or you can create a decision which can be configured as per input and gives out the output.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cascade Dropdown</title><link>https://community.appian.com/thread/67756?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 20:49:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3a5b0e4d-6c1e-490c-bbeb-03fde1b0f041</guid><dc:creator>gopalk0002</dc:creator><description>&lt;p&gt;yes Correct. we will retrieve values from data repository.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cascade Dropdown</title><link>https://community.appian.com/thread/67755?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 20:48:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc798e52-5727-4db3-a50f-e9b63b3296fd</guid><dc:creator>gopalk0002</dc:creator><description>&lt;p&gt;thanks &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cascade Dropdown</title><link>https://community.appian.com/thread/67754?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 20:42:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:75fa2527-5375-4e9b-b7c5-c7ae12694bfc</guid><dc:creator>gopalk0002</dc:creator><description>&lt;p&gt;Thanks &lt;a href="/members/ekanshj"&gt;ekanshj&lt;/a&gt; for replying, if user selects second option or third option he will get same options in second dropdown. how can we configure it dynamically.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cascade Dropdown</title><link>https://community.appian.com/thread/67747?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 14:52:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:905a329c-fc17-4c17-87ab-83173b149b55</guid><dc:creator>Robert Shankin</dc:creator><description>&lt;p&gt;I like the spirit of this answer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just note that &lt;a href="/members/ekanshj"&gt;ekanshj&lt;/a&gt; - for illustrative purposes, I assume - is loading the drop down values from hard-coded arrays in the SAIL.&amp;nbsp; This will work fine for the example.&amp;nbsp; However, in practical application, this can be a chore to maintain.&amp;nbsp; Typically, a more flexible solution would be to retrieve those values from your reference data repository.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cascade Dropdown</title><link>https://community.appian.com/thread/67746?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 13:41:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:627dc124-6c8f-497c-95bc-2ef4c5a59980</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;If the second dropdown is ever going to be required, you might want to&amp;nbsp;replace &amp;quot;showWhen:&amp;quot; in&amp;nbsp;ekanshj&amp;#39;s example code with &amp;quot;disabled:&amp;quot;&amp;nbsp; It helps the user not be shocked by the addition of a new field, but informs them of exactly how many inputs they&amp;#39;re going to have to fill in and in what order.&lt;/p&gt;
&lt;p&gt;UX is a bit more of an art than a science, though.&amp;nbsp; You can try both approaches and see which you prefer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cascade Dropdown</title><link>https://community.appian.com/thread/67721?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 01:24:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3a9cd3f1-7489-491b-8ef1-21a97939e9a0</guid><dc:creator>ekanshj</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/gopalk0002"&gt;gopalk0002&lt;/a&gt;&lt;br /&gt;You can achieve this by saving the values to be shown in the second drop-down on the selection of 1st drop-down and show the second one only after the first is selected.&amp;nbsp;&lt;br /&gt;Make sure to do a null condition if the option is changed in the first one. Something like this.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;load(
  local!dropdown1: {1,2,3},
  local!value1,
  local!value2,
  local!dropdown2,
  {
  a!dropdownField(
    label: &amp;quot;Dropdown 1&amp;quot;,
    placeholderLabel: &amp;quot;Please select&amp;quot;,
    choiceLabels: local!dropdown1,
    choiceValues: local!dropdown1,
    value: local!value1,
    saveInto: {
      local!value1,
      a!save(local!value2,NULL),
      if(local!value1=local!dropdown1[1],a!save(local!dropdown2,{4,5,6}),a!save(local!dropdown2,{7,8,9}))
    }
  ),
  a!dropdownField(
    showWhen: not(rule!APN_isBlank(local!value1)),
    label: &amp;quot;Dropdown 2&amp;quot;,
    placeholderLabel: &amp;quot;Please select&amp;quot;,
    choiceLabels: local!dropdown2,
    choiceValues: local!dropdown2,
    value: local!value2,
    saveInto: local!value2
 )
})&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>