<?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>does a!localVariables() refresh local variables by default?</title><link>https://community.appian.com/discussions/f/user-interface/17539/does-a-localvariables-refresh-local-variables-by-default</link><description>My team is using Appian 19.2 and since they now have a!localVariables() as a replacement for load(0 and with(), we&amp;#39;ve been using it explicitly. However I noticed that if I have local variables that query data inside the local variables definition, it</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: does a!localVariables() refresh local variables by default?</title><link>https://community.appian.com/thread/69137?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 17:35:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:de56669a-bd7f-4bbe-83c0-c6c650dbce48</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;If you ever see a user clicking refresh once per second for 65 straight years, I hope you&amp;#39;ll call me because that&amp;#39;d be a neat sight ;-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: does a!localVariables() refresh local variables by default?</title><link>https://community.appian.com/thread/69136?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 17:04:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ef2af37d-8c57-43d8-9840-be3441135292</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;or maybe a boolean&lt;/p&gt;
&lt;p&gt;local!flipflop: false()&lt;/p&gt;
&lt;p&gt;then in your saveInto, a!save(local!flipflop, not(local!flipflop))&lt;/p&gt;
&lt;p&gt;It&amp;#39;s unlikely that you&amp;#39;d ever do the 2 billion plus iterations on a single run through the form needed to reach infinity, but if you ever did...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: does a!localVariables() refresh local variables by default?</title><link>https://community.appian.com/thread/69131?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 14:04:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7b7f9141-4f60-45f6-b371-8693a9a465ad</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;What we&amp;#39;ve been told officially is that &lt;strong&gt;&lt;em&gt;refreshOnReferencedVarChange&lt;/em&gt;&amp;nbsp;&lt;/strong&gt;will cause variables to only refresh when a referenced variable changes, and not at any other time.&amp;nbsp; So far I haven&amp;#39;t seen anything that directly contradicts this.&amp;nbsp; Setting&amp;nbsp;&lt;strong&gt;&lt;em&gt;refreshAlways&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;to TRUE (which of course defaults to false) will mimic the old&amp;nbsp;&lt;em&gt;with()&lt;/em&gt; behavior.&lt;/p&gt;
&lt;p&gt;A fun trick I&amp;#39;ve implemented is, if I want to have a &amp;quot;refresh&amp;quot; button/link, i.e. to update a grid with potential recent updates, i&amp;#39;ll have it increment a local integer variable, and add that variable name to the&amp;nbsp;&lt;strong&gt;&lt;em&gt;refreshOnVarChange&lt;/em&gt; &lt;/strong&gt;list for the query I want to refresh (instead of setting it to refreshAlways, for instance).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: does a!localVariables() refresh local variables by default?</title><link>https://community.appian.com/thread/69129?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 13:57:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1b82d9df-4075-4111-a210-5049f10e8690</guid><dc:creator>Jose H.</dc:creator><description>&lt;p&gt;Thanks for the reply, this is good to know. But to clarify something, if a local variable calling a query does not reference another variable, it will never refresh when interacting with the form, correct? or will still query the data again every time the user interacts with it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: does a!localVariables() refresh local variables by default?</title><link>https://community.appian.com/thread/69098?ContentTypeID=1</link><pubDate>Thu, 29 Aug 2019 19:40:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4d0ef926-f3cb-45b6-80fd-c4f9eba93a85</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;To confirm, variables defined in &lt;em&gt;a!localVariables()&lt;/em&gt;, but without using &lt;em&gt;a!refreshVariable()&lt;/em&gt;, will be defined with all the&amp;nbsp;&lt;strong&gt;default settings&lt;/strong&gt;&amp;nbsp;for&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;em&gt;a!refreshVariable()&lt;/em&gt; - this includes the parameter of &amp;quot;&lt;em&gt;refreshOnReferencedVarChange&lt;/em&gt;&amp;quot; defaulting to TRUE.&amp;nbsp; When changing over load() calls to &lt;em&gt;a!localVariables()&lt;/em&gt;, this needs to be taken into account - mainly, if defining a local variable to hold the *original* value of some previously-defined value on the form, one would need to set&amp;nbsp;&lt;em&gt;refreshOnReferencedVarChange&lt;/em&gt; to FALSE.&amp;nbsp; All in all, though, the new system should make&amp;nbsp;most standard&amp;nbsp;use cases&amp;nbsp;easier (and it also makes some previously impossible ones possible).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>