<?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>Auto Populate</title><link>https://community.appian.com/discussions/f/new-to-appian/23533/auto-populate</link><description>Hi, 
 
 I have two date fields last-updated and next-update, 
 when i enter last-updated date then next-update field need to be auto populated (last-upadate+2years= next-update) 
 how can i achieve this? 
 
 Thanks, 
 Kavya</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Auto Populate</title><link>https://community.appian.com/thread/90160?ContentTypeID=1</link><pubDate>Tue, 25 Jan 2022 11:39:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:00588786-9f32-4d3f-8c0a-98e0158c969e</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;Thanks Harshit&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto Populate</title><link>https://community.appian.com/thread/90159?ContentTypeID=1</link><pubDate>Tue, 25 Jan 2022 11:33:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2fab8f05-7a77-4667-bdb8-024c5269fd7e</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Hi Gopal,&lt;/p&gt;
&lt;p&gt;You can use it.&amp;nbsp;&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/pastedimage1643110390603v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto Populate</title><link>https://community.appian.com/thread/90150?ContentTypeID=1</link><pubDate>Tue, 25 Jan 2022 10:15:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:235df5e9-e50f-42e2-a0c1-6b828a667be1</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Here&amp;#39;s an example of what I meant:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!lastUpdated: null,
  local!nextUpdate: null,
  {
    a!dateField(
      label: &amp;quot;Last UHpdated&amp;quot;,
      value: local!lastUpdated,
      saveInto: {
        local!lastUpdated,
        a!save(
          local!nextUpdate,
          local!lastUpdated + (365 * 2)
        )
      }
    ),
    a!textField(
      label: &amp;quot;Next Update&amp;quot;,
      readOnly: true,
      value: if(
        fn!isnull(local!nextUpdate),
        &amp;quot;&amp;quot;,
        fn!text(local!nextUpdate, &amp;quot;ddd mmm yyyy&amp;quot;)
      )
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto Populate</title><link>https://community.appian.com/thread/90148?ContentTypeID=1</link><pubDate>Tue, 25 Jan 2022 10:12:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:522d331b-c2c6-4258-a1e3-6aa259fe993b</guid><dc:creator>GopalK</dc:creator><description>&lt;p&gt;Hi Kavya,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In the first date field&amp;#39;s save into , save the calculated value for second date field. something like below,&lt;/p&gt;
&lt;p&gt;a!datefield(&lt;/p&gt;
&lt;p&gt;label:&amp;quot;last_updated&amp;quot;,&lt;/p&gt;
&lt;p&gt;value: local!last_pdated,&lt;/p&gt;
&lt;p&gt;saveInto{&lt;/p&gt;
&lt;p&gt;local!last_updated,&lt;/p&gt;
&lt;p&gt;a!save(local!&lt;span&gt;next_update,edate(local!last_pdated, 24))&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Auto Populate</title><link>https://community.appian.com/thread/90147?ContentTypeID=1</link><pubDate>Tue, 25 Jan 2022 10:09:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:48dbe0c9-b0e5-4a7d-87d5-844f7eaf0049</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;When your user selects a value for the &amp;#39;&lt;span&gt;last-updated&amp;#39; date you can add, on that same date field component, an a!save() to save the derived value of&amp;nbsp;last-upadate+2years into the variable that you are using as the value attribute of your &amp;#39;next-update&amp;#39; field. Assuming you don&amp;#39;t want your user to override the &amp;#39;next-update&amp;#39; value&amp;nbsp;you should make this read-only and use a different component to display its value (i.e. the underlying variable&amp;nbsp;type will be date but a read-only display of this value should be a text field, where you can use the text() function to render a friendly date, like &amp;quot;Tuesday 25th March 2022&amp;quot;)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>