<?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 autopopulate fields in an interface?</title><link>https://community.appian.com/discussions/f/user-interface/19441/how-to-autopopulate-fields-in-an-interface</link><description>Scenario:Suppose there are 3 fields(A,B,C). Field A is a custompicker, i want to autopopulate B &amp;amp; C fields on selecting the value in field A. How is it possible,Please help. 
 Basically, i have created an integration to get details from API, then i am</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to autopopulate fields in an interface?</title><link>https://community.appian.com/thread/76209?ContentTypeID=1</link><pubDate>Mon, 31 Aug 2020 16:07:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d6a2ab39-53ba-43a8-9abc-d433b018b1cd</guid><dc:creator>gauravkinger</dc:creator><description>&lt;p&gt;This worked, Thanks a lot Alex:)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to autopopulate fields in an interface?</title><link>https://community.appian.com/thread/76202?ContentTypeID=1</link><pubDate>Mon, 31 Aug 2020 13:43:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7c122f61-5e76-4a38-abad-5d84df012dc8</guid><dc:creator>alex.ladue</dc:creator><description>&lt;p&gt;If you want the updated value of the local variable to be saved into a rule input, you would need to configure that save to happen when you submit the form. So for example, you could do this in your submit button to update the latest value to your rule input on submission.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!buttonWidget(
  label: &amp;quot;Submit&amp;quot;,
  submit: true,
  style: &amp;quot;PRIMARY&amp;quot;,
  saveInto: {
    a!save(ri!b, local!b),
    a!save(ri!c, local!c)
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to autopopulate fields in an interface?</title><link>https://community.appian.com/thread/76201?ContentTypeID=1</link><pubDate>Mon, 31 Aug 2020 13:38:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3847f5c0-5f57-4a1d-adc5-15b9ab9f0469</guid><dc:creator>gauravkinger</dc:creator><description>&lt;p&gt;Thanks for your reply Alex,&lt;/p&gt;
&lt;p&gt;I am getting the values for b &amp;amp; c already on changing the ri!a part(refresh), But it is not getting saved it in my rule inputs- ri!b or ri!c.&lt;/p&gt;
&lt;p&gt;i have tried saving using a!save().&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Everytime it is showing me &amp;#39;null&amp;#39; in my Rule inputs, but it is getting displayed in my UI.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to autopopulate fields in an interface?</title><link>https://community.appian.com/thread/76199?ContentTypeID=1</link><pubDate>Mon, 31 Aug 2020 13:16:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b907b39c-3475-4bf8-826f-5d86956dbc4a</guid><dc:creator>alex.ladue</dc:creator><description>&lt;p&gt;I think you can achieve what you are trying to do by using a!refreshVariable() and the parameter &amp;quot;refreshOnVarChange&amp;quot;. Here is simple example of what it sounds like you are trying to do:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!b: a!refreshVariable(
    value: rule!getValueForB(),
    refreshOnVarChange: ri!a
  ),
  local!c: a!refreshVariable(
    value: rule!getValueForC(),
    refreshOnVarChange: ri!a
  ),
  {
    a!dropdownField(
      label: &amp;quot;a&amp;quot;,
      value: ri!a,
      saveInto: ri!a,
      choiceLabels: {1, 2, 3},
      choiceValues: {1, 2, 3}
    ),
    a!textField(
      label: &amp;quot;b&amp;quot;,
      value: local!b,
      readOnly: true
    ),
    a!textField(
      label: &amp;quot;c&amp;quot;,
      value: local!c,
      readOnly: true
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to autopopulate fields in an interface?</title><link>https://community.appian.com/thread/76195?ContentTypeID=1</link><pubDate>Mon, 31 Aug 2020 10:52:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:315b44f3-e936-41ef-b96c-4957303ace32</guid><dc:creator>gauravkinger</dc:creator><description>&lt;p style="padding-left:30px;"&gt;&lt;pre class="ui-code" data-mode="text"&gt; a!textField(
                  label: &amp;quot;GEID&amp;quot;,
                  labelPosition: &amp;quot;ABOVE&amp;quot;,
                  value:if(not(isnull(ri!replacement_soeid)),rule!ONB_GeidFromAPI(ri!replacement_soeid),&amp;quot;&amp;quot;),
                  saveInto: a!save(ri!geid,clean(save!value)),
                  refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                  readonly: true,
                  validations: {}&lt;/pre&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;I have a following code in which there is a text field &lt;strong&gt;&amp;quot;GEID&amp;quot;&lt;/strong&gt; , which is displaying a correct value, fetched from API call &lt;strong&gt;&amp;quot;rule!ONB_GeidFromAPI&amp;quot;&lt;/strong&gt;. But it is not getting saved into rule input, can you please guide or give a sample code that would be really helpful. Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to autopopulate fields in an interface?</title><link>https://community.appian.com/thread/76027?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2020 08:02:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:63013d93-b23c-4f5a-b818-77bd94ca259f</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;The values of B and C can be set to that value of a rule that you call. If you assign the value to a local! variable and make that of type a!refeshVariable() and refresh=always then the values of B and C can be re-set according to the value of A.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>