<?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>Interface with auto populating  and editing the text field.</title><link>https://community.appian.com/discussions/f/user-interface/34732/interface-with-auto-populating-and-editing-the-text-field</link><description>Hello, 
 I have a requirement where the text field should get auto-populated based on the previous action. Once the text field is auto populated I have 2 possibilities. 
 1. the user can click on submit without making any changes to the text field. In</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Interface with auto populating  and editing the text field.</title><link>https://community.appian.com/thread/133954?ContentTypeID=1</link><pubDate>Mon, 22 Apr 2024 09:35:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1b858abc-3418-4879-876a-36f92ea1a527</guid><dc:creator>hema.mathivathanan</dc:creator><description>&lt;p&gt;Thanks for your help. With this code, when we enter a new value in the document name it&amp;#39;s not reflected. I used like below:&lt;br /&gt;a!fileUploadField(&lt;br /&gt; label: &amp;quot;Document&amp;quot;,&lt;br /&gt; labelPosition: &amp;quot;ABOVE&amp;quot;,&lt;br /&gt; target: cons!TEST_APPLICATION_DOCUMENT,&lt;br /&gt; maxSelections: 1,&lt;br /&gt; value: local!document,&lt;br /&gt; saveInto: {&lt;br /&gt; local!document,&lt;br /&gt; a!submitUploadedFiles(&lt;br /&gt; onSuccess: {&lt;br /&gt; a!save(local!sucess, true),&lt;br /&gt; a!save(&lt;br /&gt; local!documentName,&lt;br /&gt; document(index(local!document, 1), &amp;quot;name&amp;quot;)&lt;br /&gt; )&lt;br /&gt; },&lt;br /&gt; onError: a!save(local!sucess, false)&lt;br /&gt; )&lt;br /&gt; },&lt;br /&gt; required: true,&lt;br /&gt; validations: {}&lt;br /&gt; )&lt;br /&gt;&lt;br /&gt;a!textField(&lt;br /&gt; label: &amp;quot;Document Name&amp;quot;,&lt;br /&gt; labelPosition: &amp;quot;ABOVE&amp;quot;,&lt;br /&gt;value: local!documentName,&lt;br /&gt; saveInto: local!documentName,&lt;br /&gt; showWhen: a!isNotNullOrEmpty(local!document),&lt;br /&gt; required: true&lt;br /&gt; )&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interface with auto populating  and editing the text field.</title><link>https://community.appian.com/thread/133953?ContentTypeID=1</link><pubDate>Mon, 22 Apr 2024 09:33:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6cf36edd-a62f-4a41-badb-5fd9d95d2e62</guid><dc:creator>hema.mathivathanan</dc:creator><description>&lt;p&gt;&lt;br /&gt;Thanks for your reply. I used similar to your code. In the&amp;nbsp;fileUploadFieldd saveinto, saved the uploaded document name to the local variable and it&amp;#39;s working fine.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interface with auto populating  and editing the text field.</title><link>https://community.appian.com/thread/133952?ContentTypeID=1</link><pubDate>Mon, 22 Apr 2024 09:29:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b5615405-bd9a-4e5e-bb80-405e0b5b961a</guid><dc:creator>hema.mathivathanan</dc:creator><description>&lt;p&gt;Hi shubham, Thanks for your help. I tried your code in a separate interface and it&amp;#39;s working fine.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interface with auto populating  and editing the text field.</title><link>https://community.appian.com/thread/133944?ContentTypeID=1</link><pubDate>Mon, 22 Apr 2024 08:37:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2f725f98-744f-4209-8627-a19527241531</guid><dc:creator>johibd1593</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/hema.mathivathanan"&gt;hema.mathivathanan&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;a!localVariables(&lt;br /&gt; local!docName,&lt;br /&gt; {&lt;br /&gt; a!fileUploadField(&lt;br /&gt; label: &amp;quot;Document&amp;quot;,&lt;br /&gt; target: cons!NA_Upload_Documnet_CONS,&lt;br /&gt; maxSelections: 1,&lt;br /&gt; value: ri!document,&lt;br /&gt; saveInto: {&lt;br /&gt; a!save(ri!document, save!value),&lt;br /&gt; a!submitUploadedFiles()&lt;br /&gt; }&lt;br /&gt; ),&lt;br /&gt; a!textField(&lt;br /&gt; label: &amp;quot;Document Name&amp;quot;,&lt;br /&gt; value: if(&lt;br /&gt; a!isNullOrEmpty(ri!document),&lt;br /&gt; null,&lt;br /&gt; document(documentId: ri!document, property: &amp;quot;name&amp;quot;)&lt;br /&gt; ),&lt;br /&gt; saveInto: { a!save(local!docName, save!value) }&lt;br /&gt; )&lt;br /&gt; }&lt;br /&gt;)&lt;/p&gt;
&lt;p&gt;You Can Try This Code .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interface with auto populating  and editing the text field.</title><link>https://community.appian.com/thread/133885?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 15:29:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f7e9f23f-8b08-419e-8f3d-7c12ad420787</guid><dc:creator>Harsh Kumar Agarwal</dc:creator><description>&lt;p&gt;Try using following code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="sql"&gt;a!localVariables(
  local!documentId,
  a!columnsLayout(
    columns: {
      a!columnLayout(
        contents: {
          a!fileUploadField(
            target: cons!APP_FOLDER_TEMPORARY_FOLDER,
            maxSelections: 1,
            value: local!documentId,
            saveInto: {
              local!documentId,
              a!save(
                ri!documentName,
                index(
                  index(
                    index(
                      a!fileUploadField(value: local!documentId),
                      &amp;quot;contents&amp;quot;,
                      null
                    ),
                    &amp;quot;value&amp;quot;,
                    null
                  ),
                  &amp;quot;fileName&amp;quot;,
                  null
                )
              )
            }
          )
        }
      ),
      a!columnLayout(
        contents: {
          a!textField(
            label: &amp;quot;File Name&amp;quot;,
            labelPosition: &amp;quot;ABOVE&amp;quot;,
            value: ri!documentName,
            saveInto: ri!documentName
          )
        }
      )
    }
  )
)&lt;/pre&gt;&lt;br /&gt;Save the document name in rule input instead of local so you do not need to make any changes on &amp;#39;SUBMIT&amp;#39; button.&lt;br /&gt;Output of above code:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/13/pastedimage1713540566314v1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interface with auto populating  and editing the text field.</title><link>https://community.appian.com/thread/133884?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 14:19:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:02e33283-929a-4c59-bbbe-191210dddba5</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;&lt;a href="/members/hema.mathivathanan"&gt;hema.mathivathanan&lt;/a&gt;&amp;nbsp;Let me know if that works for you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interface with auto populating  and editing the text field.</title><link>https://community.appian.com/thread/133882?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 14:17:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:866fe281-b873-4050-9e7e-3ae96bc9bd65</guid><dc:creator>hema.mathivathanan</dc:creator><description>&lt;p&gt;Thanks Shubham, I&amp;#39;ll try this&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interface with auto populating  and editing the text field.</title><link>https://community.appian.com/thread/133881?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 14:15:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cd42f6df-e4e5-4fb5-863f-80bd86a5d386</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;a href="/members/hema.mathivathanan"&gt;hema.mathivathanan&lt;/a&gt;&amp;nbsp;&lt;br /&gt;You have to add same code to button saveInto to reflect data into local!docName&lt;br /&gt;&lt;br /&gt;Understand below code and try to implement for yours.&lt;br /&gt;It will solve your problem.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!docName,
  local!prepopulatedName: &amp;quot;Test&amp;quot;,
  {
    a!textField(
      label: &amp;quot;File Name&amp;quot;,
      labelPosition: &amp;quot;ABOVE&amp;quot;,
      value: if(
        a!isNullOrEmpty(local!docName),
        local!prepopulatedName,
        local!docName
      ),
      saveInto: local!docName,
      refreshAfter: &amp;quot;KEYPRESS&amp;quot;
    ),
    a!buttonArrayLayout(
      buttons: {
        a!buttonWidget(
          label: &amp;quot;Button&amp;quot;,
          style: &amp;quot;OUTLINE&amp;quot;,
          saveInto: a!save(
            local!docName,
            if(
              a!isNullOrEmpty(local!docName),
              local!prepopulatedName,
              local!docName
            )
          )
        )
      },
      align: &amp;quot;START&amp;quot;,
      marginBelow: &amp;quot;NONE&amp;quot;
    )
  }
)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interface with auto populating  and editing the text field.</title><link>https://community.appian.com/thread/133880?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 13:29:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a73fb777-c182-4221-bc33-6c786a2cdc39</guid><dc:creator>hema.mathivathanan</dc:creator><description>&lt;p&gt;&amp;nbsp;&amp;nbsp;for the below issue, should we have something in the submit button?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interface with auto populating  and editing the text field.</title><link>https://community.appian.com/thread/133876?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 13:08:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b9a478ce-ad6b-4829-8193-0d54f6d5d3a3</guid><dc:creator>hema.mathivathanan</dc:creator><description>&lt;p&gt;Hi Shubham,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;tried the above code. The problem with the above code is if the user doesn&amp;#39;t change the prepoulated name, then it&amp;#39;s not saving the pre populated value to the local variable since there is no user intervention to the text field.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interface with auto populating  and editing the text field.</title><link>https://community.appian.com/thread/133874?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 12:57:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a3256307-e14e-4c33-b492-6d8f22096105</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="/members/hema.mathivathanan"&gt;hema.mathivathanan&lt;/a&gt;&amp;nbsp;&lt;br /&gt;Can you try this?&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!textField(
  label: &amp;quot;File Name&amp;quot;,
  labelPosition: &amp;quot;ABOVE&amp;quot;,
  value: if(a!isNullOrEmpty(local!docName), local!prepopulatedName, local!docName),  
  saveInto: local!docName,
  refreshAfter: &amp;quot;KEYPRESS&amp;quot;
),&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interface with auto populating  and editing the text field.</title><link>https://community.appian.com/thread/133867?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 12:37:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3f20c5fc-ab75-4730-b7bb-8826bd2cf4df</guid><dc:creator>hema.mathivathanan</dc:creator><description>&lt;p&gt;Hi Chaitanya,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My requirement is when the user upload a document, I need to get the document name from that and populate in the text field which is the &amp;quot;Document name&amp;quot;. And that&amp;#39;s why I have a separate local variable for the document name.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interface with auto populating  and editing the text field.</title><link>https://community.appian.com/thread/133864?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 12:03:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:61261ff8-5ed8-4dd3-897f-b4d7cc316f9f</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a href="/members/hema.mathivathanan"&gt;hema.mathivathanan&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Why do you want to have a different local variable to store the value? If the user doesn&amp;#39;t make any change it would not make any change and if the user makes any change it would simply save the new value. &lt;br /&gt;May be you can use exact() and have a local which has the older value/pre-loaded value which would not refresh to find if there is any change in the value and disable the submit button if that is what you are trying to do.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>