<?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 save loggedinuser in the cdt ?</title><link>https://community.appian.com/discussions/f/general/19717/how-to-save-loggedinuser-in-the-cdt</link><description>hi i need to display the logged in user in the text field and must save the name into the cdt . 
 
 Please follow the Screenshot</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77322?ContentTypeID=1</link><pubDate>Fri, 16 Oct 2020 19:47:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f3d032e1-2899-43e1-9f52-659f3d519b24</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;I believe you changed this to include multiple variables (DSR_TimeSheet and timeline). Is it possible that your type listed in the expression is no longer the correct type for the timeline?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77305?ContentTypeID=1</link><pubDate>Fri, 16 Oct 2020 08:19:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c5b8767d-9f8e-43ae-aa9b-f0f91322ed85</guid><dc:creator>swethasri</dc:creator><description>&lt;p&gt;Hi mike again logged in user not saving into every record&lt;br /&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1602836387602v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77194?ContentTypeID=1</link><pubDate>Tue, 13 Oct 2020 17:56:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2e54d5ab-e7e1-4abc-8aa2-ec3dd7a35013</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;no worries - thanks for fixing :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77179?ContentTypeID=1</link><pubDate>Tue, 13 Oct 2020 17:40:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2495272f-f3d0-4988-9e07-0188d8e10b27</guid><dc:creator>swethasri</dc:creator><description>&lt;p&gt;sorry by mistakenly i click on that instead of verify the answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77171?ContentTypeID=1</link><pubDate>Tue, 13 Oct 2020 16:32:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:14788549-9a56-4153-872e-d717b20b1d48</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Thanks for confirming - though i&amp;#39;m slightly confused why my reply also (apparently) got a downvote &lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f61b.svg" title="Stuck out tongue"&gt;&amp;#x1f61b;&lt;/span&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1602606584413v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77170?ContentTypeID=1</link><pubDate>Tue, 13 Oct 2020 16:11:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6afd7d29-80ce-4c7e-b15e-b1c7a3b27d70</guid><dc:creator>swethasri</dc:creator><description>&lt;p&gt;Thank you for the answer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77169?ContentTypeID=1</link><pubDate>Tue, 13 Oct 2020 16:06:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:95798012-9664-473e-a2c7-c58c224ebdfe</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;The example you posted above might work except you didn&amp;#39;t fill in the value for &amp;quot;employeeName&amp;quot; in your &amp;#39;type!DSR_TimeSheetLineItem&amp;#39; call.&lt;/p&gt;
&lt;p&gt;That said, it might be a bit simpler to use the method Peter was recommending previously (just.. filled out correctly), in which you can ignroe the &amp;quot;value:&amp;quot; parameter and just declare the value in the &lt;em&gt;a!save()&lt;/em&gt; call.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;addRowLink: a!dynamicLink(
  label: &amp;quot;Add Timesheet&amp;quot;,
  saveInto: {
    a!save(
      target: ri!timeline,
      value: append(
        ri!timeline,
        &amp;#39;type!{urn:com:appian:types:DSR}DSR_TimeSheetLineItem&amp;#39;(
          employerName: loggedInUser()
        )
      )
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77168?ContentTypeID=1</link><pubDate>Tue, 13 Oct 2020 15:54:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2444ff11-48dd-4ee0-bd59-c04df7356b9e</guid><dc:creator>swethasri</dc:creator><description>&lt;p&gt;Hi mike,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i have tryed this one too,&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1602604488023v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77166?ContentTypeID=1</link><pubDate>Tue, 13 Oct 2020 15:26:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bac7a25e-f57e-4c1d-9343-9d00e9ecefb2</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;My only guess for why this isn&amp;#39;t working is because you copied and pasted Peter&amp;#39;s suggested code exactly, without actually replacing &amp;quot;type!Timesheet&amp;quot; with the &lt;strong&gt;&lt;em&gt;type!&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;&lt;/em&gt; declaration for your actual CDT as utilized in &lt;em&gt;ri!timeline.&lt;/em&gt;&amp;nbsp; I can tell this hasn&amp;#39;t been completed correctly because it&amp;#39;ll look quite a bit different when you&amp;#39;ve successfully added a &lt;strong&gt;type!&lt;/strong&gt; declaration on the form.&amp;nbsp; At the end it&amp;#39;ll look a bit more like this:&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1602602849146v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77165?ContentTypeID=1</link><pubDate>Tue, 13 Oct 2020 15:22:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ecf8af90-ab66-4f08-a9cd-1a003e15b126</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;@vamsik -- The dynamic link does not need a &lt;em&gt;value&lt;/em&gt; when the only save being executed is within &lt;em&gt;a!save()&lt;/em&gt;, fyi.&amp;nbsp; In your example code above, the &lt;em&gt;value&lt;/em&gt; field adds no additional functionality compared to the same code with no value field.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77157?ContentTypeID=1</link><pubDate>Tue, 13 Oct 2020 13:44:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8168143c-d4f8-48a5-a421-a6dcd4426ba6</guid><dc:creator>vamsi krishna</dc:creator><description>&lt;p&gt;Swetha you are missing value field in a!dynamiclink()&lt;/p&gt;
&lt;p&gt;see the example below&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;addRowlink: a!dynamicLink(
          label: &amp;quot;Add Product&amp;quot;,
          value: {
            dtOfMft: today()
          },
          saveInto: {
            a!save(local!products, append(local!products, save!value))
          }
        )&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77156?ContentTypeID=1</link><pubDate>Tue, 13 Oct 2020 13:17:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a7d52fa7-58fc-4646-bdec-d60b88332f94</guid><dc:creator>swethasri</dc:creator><description>&lt;p&gt;Hi Mike,&lt;/p&gt;
&lt;p&gt;i have done what peter said , but still it wont working&lt;br /&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1602595093881v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77129?ContentTypeID=1</link><pubDate>Mon, 12 Oct 2020 17:47:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6d03f38d-10b5-4961-8139-09e6c95cd365</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;According to what I can tell from this screenshot, you haven&amp;#39;t done what Peter said needs to be done to accomplish this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In this screenshot, you&amp;#39;re still attempting to use a saveInto in a Read Only field, which will (by definition) never execute its save since no user interaction is possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77125?ContentTypeID=1</link><pubDate>Mon, 12 Oct 2020 16:58:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:aaa74f75-3b09-4d97-b219-164befd26dfd</guid><dc:creator>swethasri</dc:creator><description>&lt;p&gt;its also not working&lt;br /&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1602521919121v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77086?ContentTypeID=1</link><pubDate>Fri, 09 Oct 2020 12:23:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f3acc83d-eee7-4b0a-91f7-c0fdc5d48f4e</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;The saveInto property only occurs if there is some kind of interaction with the field. In this case, the field is read only, so there&amp;#39;s no interaction (hence why the value doesn&amp;#39;t get saved).&lt;/p&gt;
&lt;p&gt;The best way to think about doing this is what kind of action makes sense for saving these values. I&amp;#39;d suggest using the &amp;quot;Add Timesheet&amp;quot; link in order to populate the value, since the user must use that link to add a row. Here&amp;#39;s how you can set up the dynamic link:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;addRowLink: a!dynamicLink(
  label: &amp;quot;Add Timesheet&amp;quot;,
  saveInto: a!save(
    target: ri!timeline,
    value: append(
      ri!timeline,
      type!Timesheet(employerName: loggedInUser())
    )
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Another common way to save this data is on button click, since you can also guarantee that the user will click the button to submit the form.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77084?ContentTypeID=1</link><pubDate>Fri, 09 Oct 2020 11:54:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:babbe028-aa78-44fe-9b54-be41c88963bd</guid><dc:creator>swethasri</dc:creator><description>&lt;p&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1602244474335v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Employer name is not saved into CDT&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77083?ContentTypeID=1</link><pubDate>Fri, 09 Oct 2020 11:50:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0a15f450-d2d4-485e-aaa3-a79201ec526f</guid><dc:creator>ManuelHTG</dc:creator><description>&lt;p&gt;you are missing a &amp;quot;,&amp;quot; .... &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77082?ContentTypeID=1</link><pubDate>Fri, 09 Oct 2020 11:31:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:575442e0-153e-449a-b07d-1420cbba0a86</guid><dc:creator>swethasri</dc:creator><description>&lt;p&gt;it wont work sandeep, its shows error&lt;br /&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1602243124165v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to save loggedinuser in the cdt ?</title><link>https://community.appian.com/thread/77077?ContentTypeID=1</link><pubDate>Fri, 09 Oct 2020 10:30:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e417b4e1-96ca-43c2-a6ee-e7940618516a</guid><dc:creator>sandeepd</dc:creator><description>&lt;p&gt;saveInto:{fv!item.employerName, a!save(cdtname.employerName, save!value)}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>