<?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>Write a row to DB on UI load?</title><link>https://community.appian.com/discussions/f/user-interface/13252/write-a-row-to-db-on-ui-load</link><description>I would like to have an interface that, when it is accessed/loaded/refreshed by user, will write a row to a table in the database. 
 Is this possible? 
 
 Idea: Perhaps by using a!writeToDataStoreEntity, or a!startProcess? But it seems that these do not</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Write a row to DB on UI load?</title><link>https://community.appian.com/thread/88109?ContentTypeID=1</link><pubDate>Thu, 18 Nov 2021 05:51:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:df21bf9e-4fea-40cc-b7d8-590fbb6d65d3</guid><dc:creator>arunkumarc0003</dc:creator><description>&lt;p&gt;Jean Can you explain the method. we are looking something similar solution. how did you pass the data into WebAPI&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write a row to DB on UI load?</title><link>https://community.appian.com/thread/81024?ContentTypeID=1</link><pubDate>Tue, 20 Apr 2021 12:49:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8c513173-b11b-423b-bfcd-b6a5ede57cca</guid><dc:creator>jeanalainb0001</dc:creator><description>&lt;p&gt;Using an integration and a WebApi in Appian itself work fine but the integration should be a post with usage &amp;quot;Query data&amp;quot;. By this way the integration can be called in a local variable initialization and the WebApi finally write the data. But for performance consideration, it require an authentication not really necessary.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write a row to DB on UI load?</title><link>https://community.appian.com/thread/68656?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2019 20:28:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:903a4fd8-b056-42c5-860a-7f51bbb6d8b6</guid><dc:creator>agustinc477366</dc:creator><description>&lt;p&gt;David, it looks like my reply to you had been programmatically filtered for human review for looking like spam so it showed up in a different spot - let me know the bit about UUIDs/users was somewhat helpful. -Agustin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write a row to DB on UI load?</title><link>https://community.appian.com/thread/68648?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2019 17:14:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c1bd9d4d-cb26-425d-9d1e-ba996890d167</guid><dc:creator>charanrajkrishnap0001</dc:creator><description>&lt;p&gt;&lt;a href="/members/davidw0005"&gt;Dai Williams&lt;/a&gt; - You can call webAPI in Integration and use it in the form load which should write to DSE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write a row to DB on UI load?</title><link>https://community.appian.com/thread/68634?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2019 15:19:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3b7d8c43-094b-4221-94f0-dda23788c469</guid><dc:creator>Dai Williams</dc:creator><description>&lt;p&gt;Thanks, but this is for a record not a task.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write a row to DB on UI load?</title><link>https://community.appian.com/thread/68633?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2019 15:17:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9800643c-ed57-4e3d-965c-75879ce52e3c</guid><dc:creator>charanrajkrishnap0001</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/Write_5F00_DSE_5F00_on_5F00_load.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="/members/davidw0005"&gt;Dai Williams&lt;/a&gt; - You can create a process to insert the data before the form loads...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write a row to DB on UI load?</title><link>https://community.appian.com/thread/68613?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2019 12:02:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:17b35a53-a0d6-43f4-98c6-0d4a5d1a7f7b</guid><dc:creator>agustinc477366</dc:creator><description>&lt;p&gt;I hear you - this gave me trouble as well, and I don&amp;#39;t know of a solution to both parts of your problem (1 - who, 2 - which record).&lt;br /&gt;I want to give an update that when I was trying to do this, I was trying to track the user as well and I later found the logs, as Stewart commented. Since I was using Sites, I was able to do what I needed to with /audit/sites_usage.csv .&lt;/p&gt;
&lt;p&gt;For the user (the &amp;quot;who&amp;quot; part of the question), you will see the user UUID in the log Stewart mentioned, which looks like: _h-0000aa15-eaaa-9000-9aa-010a02084a_3&lt;br /&gt;I got a list of all usernames, then used the user function on those to build a mapping table between usernames and UUIDs like user(X, &amp;quot;UUID&amp;quot;).&lt;br /&gt;You can also search by UUID under &amp;quot;/suite/design&amp;quot; - USERS - Search box.&lt;/p&gt;
&lt;p&gt;-Agustin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write a row to DB on UI load?</title><link>https://community.appian.com/thread/68607?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2019 09:03:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5e63a78b-9cd1-44ac-ba14-e33522d6222f</guid><dc:creator>Dai Williams</dc:creator><description>&lt;p&gt;Hi Stewart, so the Use Case is exactly the same apart from the key question - WHO accessed the record. I have reviewed the log files and while it tells you what record has been accessed, I dont think it tells you what instance of the record and who accessed it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write a row to DB on UI load?</title><link>https://community.appian.com/thread/68606?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2019 07:46:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cdd2cff4-1e38-4ca9-a82d-e9ddad57033a</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;I&amp;#39;d be more interested in what the actual use case is. At my current client they want an audit log entry written each time someone navigates to a Record Summary and/or any other Record related View. The instinct is to try and achieve what&amp;#39;s described above but in actual fact Appian does write to an audit log these events (look in system logs/audit/records_usage.csv). This contains all the relevant details for these events and it then becomes a matter of extracting those events and dispatching/storing them as required.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write a row to DB on UI load?</title><link>https://community.appian.com/thread/68586?ContentTypeID=1</link><pubDate>Tue, 06 Aug 2019 17:51:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a5063a2f-55d9-410d-af3b-b6e29ddd8676</guid><dc:creator>Dai Williams</dc:creator><description>&lt;p&gt;Has anyone come up with a solution for writing to a database on a UI load without any external development, so purely within Appian?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write a row to DB on UI load?</title><link>https://community.appian.com/thread/59867?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 13:35:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:82785def-41a1-4773-a738-353cecf1c25a</guid><dc:creator>agustinc477366</dc:creator><description>&lt;p&gt;Dear Jim and Raghavendra,&lt;br /&gt; &lt;br /&gt; Thank you very much for your inputs! Thanks to your input, I was able to accomplish this using a workaround making use of some of the suggestions mentioned. While, as Jim mentioned, it is not possible to use POST requests without user trigger/click, I was able to find a workaround by making a GET request to a custom Google Apps Script (external web service), then using that to add the row to a DB (it acts as a POST request). I ended up writing to an external DB instead (but if&amp;nbsp;I needed to write to an internal DB,&amp;nbsp;I would have&amp;nbsp;called the&amp;nbsp;Web API from Google Apps Script to write back to Appian, as Raghavendra suggested). The code in the UI looks like this:&lt;br /&gt; &lt;br /&gt; load(&lt;br /&gt; local!temp: a!httpQuery(&lt;br /&gt; url: urlwithparameters(&amp;quot;&lt;a href="https://script.google.com/macros/s/.../exec&amp;quot;,"&gt;script.google.com/.../exec&amp;quot;,&lt;/a&gt;&lt;br /&gt; {[parameter names here]},&lt;br /&gt; {[parameter values here]})&lt;br /&gt; ),&lt;br /&gt; {}&lt;br /&gt; )&lt;/p&gt;
&lt;p&gt;For anyone trying to accomplish this, the Google Apps Script code is quite simple; basically is using the doGet method detailed here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developers.google.com/apps-script/guides/web"&gt;developers.google.com/.../web&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; Thank you again, Jim and Raghavendra!&lt;br /&gt; Agustin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write a row to DB on UI load?</title><link>https://community.appian.com/thread/59864?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 13:24:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fccd1072-1c7f-455a-8b86-ab80b86e6b35</guid><dc:creator>Jim Schweitzer</dc:creator><description>You&amp;#39;re not going to be able to call an a!httpWrite() or an integration rule that POSTs data from a load(), those have to be bound to buttons/links with bind() or called from a saveInto(). User action is required to trigger something like this.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write a row to DB on UI load?</title><link>https://community.appian.com/thread/59863?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 13:21:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ec27dbbc-ccf7-4c35-bea4-31ff3b4e01c0</guid><dc:creator>Shanmukha</dc:creator><description>Hi Agustin,&lt;br /&gt;
&lt;br /&gt;
Sorry for the delayed response. If it not working then we must use the tradition SOAP based web service calling from the UI. This should defiantly work.&lt;br /&gt;
&lt;br /&gt;
I hope it may help you.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write a row to DB on UI load?</title><link>https://community.appian.com/thread/59822?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 05:29:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e3430e7a-42c0-4b9a-9ba7-a3840d50f21f</guid><dc:creator>agustinc477366</dc:creator><description>Dear Raghavendra,&lt;br /&gt;
&lt;br /&gt;
Thank you for your smart suggestion! I am trying to do this - I setup a Web API that successfully writes to the DB; then I setup an integration that calls the Web API (this works too, and causes the successful write to the DB). Now, I am calling the integration as a rule from the UI as follows: load( local!test: rule!testIntegration(onSuccess: null, onError: null) , {} ) - however, this fails with a similar error about &amp;quot;Reaction Tree&amp;quot; as the one above. Do you know if I am calling it incorrectly from the UI?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write a row to DB on UI load?</title><link>https://community.appian.com/thread/59821?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 04:24:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4dfedac2-01d6-47c0-94bd-3709b90f7fdc</guid><dc:creator>Shanmukha</dc:creator><description>Hi Agustin,&lt;br /&gt;
&lt;br /&gt;
Did you try this with Web API and configure it in integration and call it as a rule in the UI?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>