<?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>default value</title><link>https://community.appian.com/discussions/f/user-interface/38258/default-value</link><description>in dropdown i have to show default values then it has only single value if dropdown has multiple choices i can show then value will be null 
 ex: here detail has many values this i have to show as it is no change in this 
 this dropdown has single option</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: default value</title><link>https://community.appian.com/thread/144133?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 14:55:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9fd76566-efc4-41ea-9c86-19977e5be7f6</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Note, this is a duplicate post of the one seen &lt;a href="/discussions/f/user-interface/38263/default-value"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: default value</title><link>https://community.appian.com/thread/144121?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 10:19:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c4197ad6-88c6-46d8-9f6d-ec94e87bb632</guid><dc:creator>Nilanshu Moolwani</dc:creator><description>&lt;p&gt;You can check the length of the options and then use them in the value parameter if its 1.&lt;br /&gt;&lt;br /&gt;Here&amp;#39;s the code for your reference:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!options: {&amp;quot;a&amp;quot;},
  local!selectedValue: if(
    length({local!options}) = 1,
    local!options,
    null
  ),
  {
    a!dropdownField(
      label: &amp;quot;dropdown&amp;quot;,
      choiceLabels: local!options,
      choiceValues: local!options,
      placeholder: &amp;quot;--select a value--&amp;quot;,
      value: local!selectedValue,
      saveInto: local!selectedValue
    )
  }
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Let me know if you need any other support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>