<?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>dropdowns question</title><link>https://community.appian.com/discussions/f/rules/25490/dropdowns-question</link><description>hello! i have a question, well, i have a dropdown with some data, for example, in a dropdown i have states, what i want is that when i select a specific state, a list of cities appears in another dropdown, with my team we have done it with if, if nested</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: dropdowns question</title><link>https://community.appian.com/thread/99378?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2022 06:17:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6edf92dc-2380-4284-9b7c-490ce82faf00</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Did you have a look at this pattern?&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/22.2/recipe-configure-cascading-dropdowns.html"&gt;docs.appian.com/.../recipe-configure-cascading-dropdowns.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: dropdowns question</title><link>https://community.appian.com/thread/99322?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2022 19:53:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0078f195-5a96-4376-b4d6-8c36bc600a54</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;This is pretty easy to set up once you&amp;#39;re used to the necessary local-variable-juggling, but it *is* several different things to juggle, and takes some getting used to it.&lt;/p&gt;
&lt;p&gt;Without knowing what you&amp;#39;ve already tried and what specific errors you&amp;#39;re getting (but knowing some of the possibilities from experience), here are the high-level steps you will need to make sure you&amp;#39;ve done in order to do this gracefully:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;set up your interface to pre-load all dropdown selection possibilities into local variables.&lt;/li&gt;
&lt;li&gt;for any variables that depend on the value selected in a previous dropdown (i.e. cities that depend on the selection of a state), use logic in the local variable definition itself to intentionally pull back a blank list when no item is selected for the dependent list.
&lt;ol&gt;
&lt;li&gt;this can be done via if() logic, or by passing in a known-invalid &lt;em&gt;state ID&lt;/em&gt; when the selected state is blank&lt;/li&gt;
&lt;li&gt;upon form load, therefore, the &lt;strong&gt;&lt;em&gt;cities &lt;/em&gt;&lt;/strong&gt;&lt;em&gt;&lt;/em&gt;list should load empty, and&lt;/li&gt;
&lt;li&gt;... the dropdown should be set to cleanly handle having it be empty (i.e. use property() to load the values -- &lt;em&gt;property(local!cities, &amp;quot;id&amp;quot;, {})&lt;/em&gt;, &lt;em&gt;property(local!cities, &amp;quot;name&amp;quot;, {})&lt;/em&gt;, etc.)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;in the saveInto for the higher-level dropdown (states in this case), be sure to add the necessary &lt;em&gt;&lt;strong&gt;saveInto&lt;/strong&gt;&lt;/em&gt; entry to &lt;em&gt;&lt;strong&gt;clear out&lt;/strong&gt;&lt;/em&gt; the value for the selected &lt;em&gt;city&lt;/em&gt; (if any), or else if the user has selected a state AND city, then changes the state (causing the available cities to re-query), the &lt;em&gt;selected city&lt;/em&gt; will no longer be valid and would otherwise cause a pink error.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>