<?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>Refresh Variable not refreshing expression rule Data</title><link>https://community.appian.com/discussions/f/user-interface/28740/refresh-variable-not-refreshing-expression-rule-data</link><description>Hi 
 I am trying to refresh my Data stored in the expression. There is link which stores true, false in local!refreshBool and I want to refresh the data based on that. This expression rule pulls data from Integration. 
 But the Data is not getting refreshed</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Refresh Variable not refreshing expression rule Data</title><link>https://community.appian.com/thread/113281?ContentTypeID=1</link><pubDate>Thu, 25 May 2023 12:42:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d2927d84-e3a6-49af-a8f5-0a7102a817b6</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;if you&amp;#39;re the same one i was replying to before, please see my recent reply just above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refresh Variable not refreshing expression rule Data</title><link>https://community.appian.com/thread/113280?ContentTypeID=1</link><pubDate>Thu, 25 May 2023 12:30:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c92ca400-d911-4cfc-bc85-996936090e56</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="185244" url="~/discussions/f/user-interface/28740/refresh-variable-not-refreshing-expression-rule-data/113065#113065"]in the expression rule I have formatted the Integration response. [/quote]
&lt;p&gt;I&amp;#39;d actually need to see the code snipet used in your expression rule (especially the meta-structure of the rule setup; you can redact any sensitive contents if needed).&lt;/p&gt;
&lt;p&gt;Is this it?&amp;nbsp; I&amp;#39;ll admit I was confused by this thread being attended by 2 different Community accounts, but this looks to be the same rule.&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1685017981604v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The problem with calling this expression rule on an interface, is the value &amp;quot;&lt;em&gt;local!allData&lt;/em&gt;&amp;quot; will NEVER REFRESH on its own, because it&amp;#39;s being defined in the expression rule&amp;#39;s own &amp;quot;&lt;em&gt;a!localVariables()&lt;/em&gt;&amp;quot; call, and within the context of a single interface, and a single local variable declaration in the parent interface, the value will load the first time (upon initialization of the form) then persist.&amp;nbsp; Doing a force refresh on the variable declaration in the parent form won&amp;#39;t effect the value already loaded into the local variable in the expression rule, unless you pass a refresh variable into the expression rule itself and add it to the declaration of &lt;em&gt;local!allData&lt;/em&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refresh Variable not refreshing expression rule Data</title><link>https://community.appian.com/thread/113267?ContentTypeID=1</link><pubDate>Thu, 25 May 2023 09:24:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:35bbb340-2f8d-477f-8a46-bb7a72a9b11b</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;In that expression, add a refresh configuration to local!allData. Either set refreshallways=true or use that boolean.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refresh Variable not refreshing expression rule Data</title><link>https://community.appian.com/thread/113266?ContentTypeID=1</link><pubDate>Thu, 25 May 2023 09:00:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d3fcf5bc-f3d6-4b9f-bfeb-da6b6f3f34c0</guid><dc:creator>vikashk7323</dc:creator><description>&lt;p&gt;I have used local variables to format Data from Integration response. So what should be my appraoch to refresh data by button click on the Interface&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1685005694041v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is my expression rule where I am formatting the Data to use in the Interface&lt;/p&gt;
&lt;p&gt;Interface&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1685005761182v3.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refresh Variable not refreshing expression rule Data</title><link>https://community.appian.com/thread/113066?ContentTypeID=1</link><pubDate>Sun, 21 May 2023 08:38:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bdccbccf-c881-4b28-b1e7-d9e0a0405950</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;In case you use local variables inside that expression rule, you need to add a refreshVariable with refreshAlways set to true. Else Appian will use the cached value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refresh Variable not refreshing expression rule Data</title><link>https://community.appian.com/thread/113065?ContentTypeID=1</link><pubDate>Sun, 21 May 2023 04:15:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:83435328-7271-4519-bebb-f148aa17d40b</guid><dc:creator>kumark4975</dc:creator><description>&lt;p&gt;Hi Mike, in the expression rule I have formatted the Integration response. I have a dynamic link which store true/false value in the&amp;nbsp;local!refreshBool, I want to refresh the integration response when clicked on the dynamic link&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refresh Variable not refreshing expression rule Data</title><link>https://community.appian.com/thread/113063?ContentTypeID=1</link><pubDate>Sun, 21 May 2023 01:26:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2615e082-3a43-4409-af62-b7b2975f8420</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;What is inside your expression rule?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refresh Variable not refreshing expression rule Data</title><link>https://community.appian.com/thread/113061?ContentTypeID=1</link><pubDate>Sat, 20 May 2023 16:15:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f329e35f-9bbf-4ac1-875e-ac1e0ae08cec</guid><dc:creator>kumark4975</dc:creator><description>&lt;p&gt;Thanks for the response Stefan.&amp;nbsp;&amp;nbsp;have tried with local!data as well but it&amp;#39;s not refreshing&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!refreshBool,
  local!data: a!refreshVariable(
    value: rule!TA_getAndFormatRandomUser(),
    refreshOnVarChange:   local!refreshBool
    ),&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Refresh Variable not refreshing expression rule Data</title><link>https://community.appian.com/thread/113059?ContentTypeID=1</link><pubDate>Sat, 20 May 2023 08:46:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:94d5f217-4687-4eb8-9d2c-c9c63c38401c</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;That&amp;#39;s a weird construct. Why do you expect refreshData to change, when local!data stays the same. You have to add the refreshVariable to local !data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>