<?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>How to get Selected Choice Label in a rule input Variable</title><link>https://community.appian.com/discussions/f/user-interface/20976/how-to-get-selected-choice-label-in-a-rule-input-variable</link><description>My dropdown field is this: 
 a!dropdownField( label: &amp;quot;Appliance Id&amp;quot;, labelPosition: &amp;quot;JUSTIFIED&amp;quot;, placeholder: &amp;quot;Select the appliance&amp;quot;, choiceLabels: rule!LN_Concatenate_Appliance_Customer_Details(local!userId), choiceValues: rule!LN_Fetch_Appliance_Based_Customer_Id</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to get Selected Choice Label in a rule input Variable</title><link>https://community.appian.com/thread/81705?ContentTypeID=1</link><pubDate>Sun, 16 May 2021 14:21:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6fe93945-e352-4dda-80e2-2b0f2159c2d5</guid><dc:creator>leeaan0001</dc:creator><description>&lt;p&gt;Thank you so much! It worked. Yes, I just needed it for displaying in text, so casting wasn&amp;#39;t required.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get Selected Choice Label in a rule input Variable</title><link>https://community.appian.com/thread/81704?ContentTypeID=1</link><pubDate>Sun, 16 May 2021 13:46:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5e969702-4d52-40c4-b80f-7cef258256ba</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Also, you might need to explicitly cast the params of displayValue in the desired data type for ease of use.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get Selected Choice Label in a rule input Variable</title><link>https://community.appian.com/thread/81703?ContentTypeID=1</link><pubDate>Sun, 16 May 2021 13:44:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c9f3796d-1928-468d-9b5c-0c7da7cd130c</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can use &lt;a href="https://docs.appian.com/suite/help/21.1/fnc_conversion_displayvalue.html"&gt;displayValue&lt;/a&gt; function inside your saveInto param. That way, you will be able to identify the selected label and save it into the desired RI.&amp;nbsp;&lt;br /&gt;For instance, let&amp;#39;s suppose the RI in which you want to save is &amp;#39;selectedLabel&amp;#39;. Now please refer to the code snippet below.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!dropdownField(
  label: &amp;quot;Appliance Id&amp;quot;,
  labelPosition: &amp;quot;JUSTIFIED&amp;quot;,
  placeholder: &amp;quot;Select the appliance&amp;quot;,
  choiceLabels: rule!LN_Concatenate_Appliance_Customer_Details(local!userId),
  choiceValues: rule!LN_Fetch_Appliance_Based_Customer_Id(local!userId).data.applianceId.applianceId,
  value: local!applianceId,
  saveInto: {
    local!applianceId,
    ri!Servicing.applianceId.applianceId,
    a!save(
      ri!selectedLabel,
      displayvalue(
        local!applianceId,
        rule!LN_Fetch_Appliance_Based_Customer_Id(local!userId).data.applianceId.applianceId,
        rule!LN_Concatenate_Appliance_Customer_Details(local!userId),
        null
      )
    )
  },
  showWhen: ri!isCustomerCare
)&lt;/pre&gt;It should do the work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;Harshit&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>