<?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>Refreshing a Grid from two different scenarios</title><link>https://community.appian.com/discussions/f/user-interface/38253/refreshing-a-grid-from-two-different-scenarios</link><description>I have an interface that gets data via an integration and then filters those results: 
 
 And it is displayed in a grid: I want the grid to refresh on two different scenarios - 1. on RECORD_ACTION (adding a new row) 2. when a row is edited by direct integration</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Refreshing a Grid from two different scenarios</title><link>https://community.appian.com/thread/144053?ContentTypeID=1</link><pubDate>Fri, 03 Jan 2025 14:57:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:85b7cc99-92be-4e83-b23e-cfe0343a2b92</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="83375" url="~/discussions/f/user-interface/38253/refreshing-a-grid-from-two-different-scenarios/144041"]There is a refresh for record actions, but I need to test two scenarios :&amp;nbsp; when a record action happens OR when a seemingly non related integration call is made from the interface[/quote]
&lt;p&gt;Time for a quick sanity check here - why are you bending over backwards to combine the refresh conditions into other local variables instead of just adding multiple refresh conditions to the original query&amp;#39;s local variable?&amp;nbsp; Stefan&amp;#39;s most recent example shows how you can easily make a single variable observe both a refresh counter as well as the &amp;quot;RECORD_ACTION&amp;quot;, and you can add other condition(s) as needed there too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refreshing a Grid from two different scenarios</title><link>https://community.appian.com/thread/144052?ContentTypeID=1</link><pubDate>Fri, 03 Jan 2025 14:48:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:20f9e62a-6c38-480c-8f8c-8938de7cc6b3</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="274702" url="~/discussions/f/user-interface/38253/refreshing-a-grid-from-two-different-scenarios/144046"]You can then increment that counter using a!save() inside any saveInto.[/quote]
&lt;p&gt;This is a favorite technique of mine too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refreshing a Grid from two different scenarios</title><link>https://community.appian.com/thread/144046?ContentTypeID=1</link><pubDate>Fri, 03 Jan 2025 06:46:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:372f974b-e78e-4025-a1ed-f7c55727f412</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;More like so&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!refreshCounter: 1,
  local!data: a!refreshVariable(
    value: /* YOUR QUERY */
    refreshAfter: &amp;quot;RECORD_ACTION&amp;quot;,
    refreshOnVarChange: local!refreshCounter
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You can then increment that counter using a!save() inside any saveInto.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refreshing a Grid from two different scenarios</title><link>https://community.appian.com/thread/144041?ContentTypeID=1</link><pubDate>Thu, 02 Jan 2025 22:47:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a333ca65-6a2f-41cf-b86f-ccf7311eb06c</guid><dc:creator>nancyb0004</dc:creator><description>&lt;p&gt;There is a refresh for record actions, but I need to test two scenarios :&amp;nbsp; when a record action happens OR when a seemingly non related integration call is made from the interface&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refreshing a Grid from two different scenarios</title><link>https://community.appian.com/thread/144040?ContentTypeID=1</link><pubDate>Thu, 02 Jan 2025 22:45:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:36e17946-9dcc-404e-805f-04fae8e85689</guid><dc:creator>nancyb0004</dc:creator><description>&lt;p&gt;TY - so my test is would then&amp;nbsp;be? &amp;nbsp; Currently looking for&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt; local!isCommentUpdated: a!refreshVariable(
    value: local!editCompleted,
    refreshOnReferencedVarChange: local!editCompleted
  ),
  local!isCommentAdded: a!refreshVariable(
    value: now(),
    refreshAfter: &amp;quot;RECORD_ACTION&amp;quot;
  ),
  local!isRefreshNeeded: if(
    or(
      local!isCommentUpdated,
      local!isCommentAdded
    ),
    true,
    false
  ),&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;How do I compare the value now of isCommentAdded in the isRefreshNeeded block?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refreshing a Grid from two different scenarios</title><link>https://community.appian.com/thread/144039?ContentTypeID=1</link><pubDate>Thu, 02 Jan 2025 20:50:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a2c34ea8-a49c-41c6-9e0a-b3c4c7394fc4</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;There is already a refresh for record actions. So there is no need to try to use that counter approach for record actions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refreshing a Grid from two different scenarios</title><link>https://community.appian.com/thread/144036?ContentTypeID=1</link><pubDate>Thu, 02 Jan 2025 20:44:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8f2fb0a5-1424-45ce-aeba-e3d2bfa21517</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;In rarer cases like this, I&amp;#39;ve found it useful to use a local timetamp.&lt;/p&gt;
&lt;p&gt;local!lastUpdateTime: a!refreshVariable(value: now(), refreshAfter: &amp;quot;RECORD_ACTION&amp;quot;),&lt;/p&gt;
&lt;p&gt;this value will be updated to a new timestamp any time a record action is observed.&amp;nbsp; This variable cand then be added to the refresh variable &amp;quot;on var change&amp;quot; watchers for any relevant local variable(s) that need to be updated after the record action.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refreshing a Grid from two different scenarios</title><link>https://community.appian.com/thread/144032?ContentTypeID=1</link><pubDate>Thu, 02 Jan 2025 20:34:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:755d5aa5-259a-4aa3-95a2-b0d2774f30e4</guid><dc:creator>nancyb0004</dc:creator><description>&lt;p&gt;How would I make the record action increment the record counter?&amp;nbsp; &amp;nbsp;The other scenario I can do (the edit that does a call to an integration I can do easily enough) the record action doesn&amp;#39;t have a way for me to increment that variable?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refreshing a Grid from two different scenarios</title><link>https://community.appian.com/thread/144026?ContentTypeID=1</link><pubDate>Thu, 02 Jan 2025 18:36:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:30a38533-aef7-4094-86dd-233333ab0c92</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;In such multi-update scenarios, I just create a local counter variable which I increment when I want the data to refresh. Then make my local refresh depending on that counter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refreshing a Grid from two different scenarios</title><link>https://community.appian.com/thread/144025?ContentTypeID=1</link><pubDate>Thu, 02 Jan 2025 17:58:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:717d68ab-8781-4c3e-9ccd-91cf99f3ccd3</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I worry that you&amp;#39;re overcomplicating this.&amp;nbsp; What happens if you simply declare local!caseCommentsResult to use the &amp;quot;refreshAfter: &amp;quot;RECORD_ACTION&amp;quot;&amp;quot; parameter?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>