<?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>Need to update audit in table while clicking a!safelink</title><link>https://community.appian.com/discussions/f/user-interface/39563/need-to-update-audit-in-table-while-clicking-a-safelink</link><description>We are using a!safelink to provide provision to download a file using presigned URL. The requirement is we need to store which user clicked on the link and when in audit table, but 
 as in the safelink there are no saveinto parameter . I tried multiple</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Need to update audit in table while clicking a!safelink</title><link>https://community.appian.com/thread/152574?ContentTypeID=1</link><pubDate>Tue, 25 Nov 2025 14:29:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cf8dd760-b933-4f6d-b83b-266a3783d1b2</guid><dc:creator>Santhosh R</dc:creator><description>&lt;p&gt;Hi Anvesh, Not sure if you are still looking for a solution. I had a similar requirement, and this is how I got it done.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Step 1: Create a Web API (POST Method) that creates audit history either using startProcess or writeRecords logic.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Step 2: Create an integration to make a call to this Web API. We need these 2 objects since we cannot call POST Web API as part of a safe link.&lt;/p&gt;
&lt;p&gt;Step 3: Create a Web API (GET Method) which will redirect the user to the appropriate link as show in the inserted code.&lt;/p&gt;
&lt;p&gt;Step 4: Provide the URL of the Web API created at Step 3 as safe link.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;pre class="ui-code" data-mode="text"&gt;a!httpResponse(
  statusCode: 301,
  headers: {
    a!httpHeader(
      name: &amp;quot;Location&amp;quot;,
      value: http!request.queryParameters.uri  
      /*This is the URL to which the user should be navigated*/
    )
  },
  body: rule!PREFIX_POST_AuditHistory(
    .......
  )
  /*this is the integration call to write audit history*/
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to update audit in table while clicking a!safelink</title><link>https://community.appian.com/thread/150864?ContentTypeID=1</link><pubDate>Tue, 12 Aug 2025 03:24:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:aa4cde71-4cc3-4429-a03a-4883ada11f88</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;What you are saying makes sense! There might not be a perfect solution but with 2 clicks it&amp;rsquo;s as close as it can be.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to update audit in table while clicking a!safelink</title><link>https://community.appian.com/thread/150862?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2025 17:41:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f89e0865-2963-4b54-8633-1f687196e395</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Except your solution (while also good) has a similar, if reversed, weakness - namely, you can&amp;#39;t force a user to click &amp;quot;submit&amp;quot; on a process start form, so some users will merely click away / close the browser window / etc, meaning they&amp;#39;d never get a log entry generated.&lt;/p&gt;
&lt;p&gt;In my solution above, the caveat that the customers would need to understand and accept would be &amp;quot;these logged instances are where a user was SHOWN the external link / download link&amp;quot;.&amp;nbsp; While some exceptions might exist where the user &amp;quot;generated&amp;quot; the link but never clicked it, there would at least be zero link clicks without a log entry.&amp;nbsp; (Also even in your Start Form solution, some users could still click into the start form and hit &amp;quot;submit&amp;quot; without clicking on the external / download link, leaving us with the same logging disparity anyway.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to update audit in table while clicking a!safelink</title><link>https://community.appian.com/thread/150860?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2025 16:51:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:09b2502d-5ccf-4058-9609-b51ae47aea83</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;An issue with this design&amp;nbsp;is that user details will be added to log even before they downloaded! If user generates the link but doesn&amp;rsquo;t download then log has an invalid/inaccurate entry. Writing to logs after download is more integral though might need additional click as suggested in my earlier response!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to update audit in table while clicking a!safelink</title><link>https://community.appian.com/thread/150855?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2025 16:21:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5922e143-af06-442b-99b8-863d41a1fd53</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="299046" url="~/discussions/f/user-interface/39563/need-to-update-audit-in-table-while-clicking-a-safelink/150849"]Thinking of setting up a public community portal where devs can post and vote on must-have Appian features[/quote]
&lt;p&gt;Funny, because I was just saying the other day in the Discord how I was thinking about setting up a place where devs can place monetary bounties on the features they most want, to be paid to the Appian Engineer responsible for getting such feature into general release.&amp;nbsp; Sadly I&amp;#39;m not sure if I have the time or pre-built platform for such a thing if it were to be robust and user-friendly enough for general use.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to update audit in table while clicking a!safelink</title><link>https://community.appian.com/thread/150849?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2025 15:57:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a7b18c35-b68b-4b38-99e3-e09d70d07398</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;Yeah, makes sense - seems like a limitation we&amp;rsquo;ll have to work around for now. Hopefully Appian prioritizes more practical QoL features in the future.&lt;br /&gt;Thinking of setting up a public community portal where devs can post and vote on must-have Appian features might be a good way to show Appian what improvements matter the most to us.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to update audit in table while clicking a!safelink</title><link>https://community.appian.com/thread/150848?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2025 15:53:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:de8b4edc-8bab-4543-85f2-11f779187e13</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="299046" url="~/discussions/f/user-interface/39563/need-to-update-audit-in-table-while-clicking-a-safelink/150846"]as per my understanding, it will remain so in the future[/quote]
&lt;p&gt;Agreed - Appian most likely has overriding factors preventing them from doing this even if it were technically possible to hack it in - things like web security or data safety or other things we as devs might find kinda arbitrary when faced with a use case that would even be 10x easier if only they&amp;#39;d cram the feature in.&amp;nbsp; Meanwhile there are lists of dozens of feature completeness and QoL updates they could EASILY add, with MINIMAL code refactoring or bespoke code required, that STILL get consistently overlooked (&amp;quot;we just don&amp;#39;t have time, we&amp;#39;re too busy implementing new stuff nobody is asking for...&amp;quot; &lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f616.svg" title="Confounded"&gt;&amp;#x1f616;&lt;/span&gt;), so I wouldn&amp;#39;t count on anything like this getting approved and out of their backlog anytime soon...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to update audit in table while clicking a!safelink</title><link>https://community.appian.com/thread/150846?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2025 15:36:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:291eb88c-eaa6-4f68-8d7e-b0cdf3438f27</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;&amp;nbsp;Technically, achieving this with a single click is difficult now and, as per my understanding, it will remain so in the future. Currently, every application in Appian follows the approach I mentioned, which is highly recommended. This method ensures the user experiences it as a seamless process rather than feeling like two separate clicks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to update audit in table while clicking a!safelink</title><link>https://community.appian.com/thread/150845?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2025 15:26:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f6740629-1b5f-4eb8-b4aa-efd966e6ef81</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="286853" url="~/discussions/f/user-interface/39563/need-to-update-audit-in-table-while-clicking-a-safelink/150831"]Will look forward for Appian to introduce this feature[/quote]
&lt;p&gt;Honestly I&amp;#39;m not sure how technologically feasible it is - just due to the nature of how standard web-links work.&amp;nbsp; As far as I can tell they might be stuck completely separating (functionally) links that actually open a web link, from other styles of link that intiate any sort of interface-side and/or appian-side data processing, etc.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to update audit in table while clicking a!safelink</title><link>https://community.appian.com/thread/150844?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2025 15:23:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e9970fb1-b526-4102-b455-2ebe11ada688</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;This is how SafeLink works, and has always worked.&lt;/p&gt;
&lt;p&gt;The best supported solution will simply involve 2 user clicks, in a large variety of possibilities. One click will persist whatever data you want to the DB, and the other click will be the user opening their link.&amp;nbsp; I would suggest that you require the user to first click a button (for instance) to &amp;quot;generate link&amp;quot; or &amp;quot;show link&amp;quot; where it both un-hides the existing link but then also persists your log data (and anything else you like).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to update audit in table while clicking a!safelink</title><link>https://community.appian.com/thread/150831?ContentTypeID=1</link><pubDate>Mon, 11 Aug 2025 11:38:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:07ec372d-807e-44a8-84f1-0c6b43042efb</guid><dc:creator>Anvesh Shetty</dc:creator><description>&lt;p&gt;Thanks &lt;a href="/members/harshas2775"&gt;Harsha Sharma&lt;/a&gt;&amp;nbsp;&lt;a href="/members/shubhama926776"&gt;Shubham Aware&lt;/a&gt;&amp;nbsp; for your response. But since solution I wanted is with single click and I have already implemented this with two clicks. Will look forward for Appian to introduce this feature since this is a valid Use case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to update audit in table while clicking a!safelink</title><link>https://community.appian.com/thread/150644?ContentTypeID=1</link><pubDate>Mon, 04 Aug 2025 12:50:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dbfc62a8-32f1-4f22-b0f6-eb516876195a</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;Since a!safeLink doesn&amp;#39;t support saveInto, we implement a two-step download process - first click logs the audit, second click downloads the file.&lt;br /&gt;&lt;br /&gt;Have a look at sample code for your reference:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  /* Track whether the initial link has been clicked */
  local!linkClicked: false,
  local!presignedUrl: &amp;quot;www.google.com&amp;quot;,
  {
    a!linkField(
      links: {
        /* STEP 1: Initial link that triggers audit logging */
        a!dynamicLink(
          label: &amp;quot;Click to Download&amp;quot;,
          value: true,
          saveInto: {
            /* Set flag to show the actual download link */
            local!linkClicked,
            /* Write audit record using a!writeRecords */
            /*a!writeRecords(records: {}, onSuccess: {}, onError: {})*/
          },
          showWhen: not(local!linkClicked)
        ),
        /* STEP 2: Actual download link shown after audit is logged */
        a!safeLink(
          label: &amp;quot;Download Now&amp;quot;,
          uri: local!presignedUrl,
          /* Only show after the first link is clicked and audit is logged */
          showWhen: local!linkClicked,
          openLinkIn: &amp;quot;NEW_TAB&amp;quot;
        )
      }
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to update audit in table while clicking a!safelink</title><link>https://community.appian.com/thread/150630?ContentTypeID=1</link><pubDate>Mon, 04 Aug 2025 10:24:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3225c21f-e43d-40fa-a059-2b2c56512918</guid><dc:creator>Harsha Sharma</dc:creator><description>&lt;p&gt;It is not possible to download and write to audit in single click. You can however have a process with start form. User can click on the download link in the start form and close the form using submit button. In process you can use pp!initiator to write the data in audit.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>