<?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>Variable not getting refreshed inside a!refreshVariable</title><link>https://community.appian.com/discussions/f/general/34287/variable-not-getting-refreshed-inside-a-refreshvariable</link><description>I am trying this piece of code but it is just executing while loading the interface and it is never getting refreshed after that. 
 local!refresh: a!refreshVariable( value: rule!NGS_queryMerGenerationData( executeWhen: true, pagingInfo: a!pagingInfo(startIndex</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Variable not getting refreshed inside a!refreshVariable</title><link>https://community.appian.com/thread/130849?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 13:27:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:89822568-bb69-4b05-9abe-4ffd792fba2d</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;I do not understand. What did you do, and where?&lt;/p&gt;
&lt;p&gt;I was asking you to add a refreshVariable with refreshAlway=true to&amp;nbsp;&lt;span&gt;local!query inside&amp;nbsp;NGS_queryEntity&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1709817916171v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Variable not getting refreshed inside a!refreshVariable</title><link>https://community.appian.com/thread/130848?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 13:26:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:240ae435-92e4-4964-8e0d-d2414e86e92b</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;refreshAlways needs to be true. The value (0.5) which you have passed is a valid value for&amp;nbsp;&lt;em class="EmphasisText---richtext_emphasis"&gt;refreshInterval&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Variable not getting refreshed inside a!refreshVariable</title><link>https://community.appian.com/thread/130846?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 13:23:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:10e7d73a-5ce8-4ecb-8a20-77919bf06c0b</guid><dc:creator>ShaliniD</dc:creator><description>&lt;p&gt;I have tried without using local variables like the following, yet the value is not getting refreshed:&lt;/p&gt;
&lt;p&gt;a!refreshVariable(&lt;br /&gt; value: cast(&lt;br /&gt; typeof(&lt;br /&gt; {&lt;br /&gt; &amp;#39;type!{urn:com:appian:types:NGS}NGS_merGeneration&amp;#39;()&lt;br /&gt; }&lt;br /&gt; ),&lt;br /&gt; a!queryEntity(&lt;br /&gt; entity: cons!NGS_DSE_MER_GENERATION,&lt;br /&gt; query: a!query(&lt;br /&gt; pagingInfo: a!pagingInfo(startIndex: 1, batchSize: - 1)&lt;br /&gt; ),&lt;br /&gt; fetchTotalCount: true&lt;br /&gt; ).data&lt;br /&gt; )&lt;br /&gt; refreshAlways: 0.5&lt;br /&gt; )&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Variable not getting refreshed inside a!refreshVariable</title><link>https://community.appian.com/thread/130843?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 13:02:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:799f5fb5-5909-411e-8733-874a2160505e</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Found it! You will have to add a refreshVariable with refreshAlways=true&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Variable not getting refreshed inside a!refreshVariable</title><link>https://community.appian.com/thread/130842?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 13:00:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:468044b3-7fca-42d9-9ed8-28c6da0d5235</guid><dc:creator>ShaliniD</dc:creator><description>&lt;p&gt;There is a local variable. Thanks for the reply. Let me try it&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Variable not getting refreshed inside a!refreshVariable</title><link>https://community.appian.com/thread/130841?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 12:56:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b9c3f67a-1c1f-4c1b-9318-cfd5a81c87e2</guid><dc:creator>ShaliniD</dc:creator><description>&lt;p&gt;a!localVariables(&lt;br /&gt; local!fetchTotalCount: if(&lt;br /&gt; rule!NGS_isBlank(ri!fetchTotalCount),&lt;br /&gt; false,&lt;br /&gt; ri!fetchTotalCount&lt;br /&gt; ),&lt;br /&gt; local!query: if(&lt;br /&gt; or(&lt;br /&gt; isnull(ri!dataStoreEntity),&lt;br /&gt; not(or(ri!executeWhen)),&lt;br /&gt; isnull(ri!pagingInfo)&lt;br /&gt; ),&lt;br /&gt; null,&lt;br /&gt; a!queryEntity(&lt;br /&gt; entity: ri!dataStoreEntity,&lt;br /&gt; query: a!query(&lt;br /&gt; selection: if(&lt;br /&gt; rule!NGS_isBlank(ri!fieldList),&lt;br /&gt; null,&lt;br /&gt; a!querySelection(&lt;br /&gt; columns: a!forEach(&lt;br /&gt; items: ri!fieldList,&lt;br /&gt; expression: a!queryColumn(field: fv!item)&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; ),&lt;br /&gt; aggregation: ri!queryAggregation,&lt;br /&gt; logicalExpression: ri!queryLogicalExpression,&lt;br /&gt; filter: ri!queryFilter,&lt;br /&gt; pagingInfo: ri!pagingInfo&lt;br /&gt; ),&lt;br /&gt; fetchTotalCount: local!fetchTotalCount&lt;br /&gt; )&lt;br /&gt; ),&lt;br /&gt; if(&lt;br /&gt; rule!NGS_isBlank(ri!returnType),&lt;br /&gt; local!query,&lt;br /&gt; cast(typeof(ri!returnType), local!query.data)&lt;br /&gt; )&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Variable not getting refreshed inside a!refreshVariable</title><link>https://community.appian.com/thread/130840?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 12:54:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:52f4e9da-a724-4e36-90c3-fcc67a4b7fab</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;OK, and what about this &amp;quot;&lt;span&gt;NGS_queryEntity&amp;quot;? Any local variables in there?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Variable not getting refreshed inside a!refreshVariable</title><link>https://community.appian.com/thread/130839?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 12:52:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a17f6577-df71-4ed7-ba89-b67925c64d9e</guid><dc:creator>ShaliniD</dc:creator><description>&lt;p&gt;rule!NGS_queryEntity(&lt;br /&gt; dataStoreEntity: cons!NGS_DSE_MER_GENERATION,&lt;br /&gt; returnType: {&amp;#39;type!{urn:com:appian:types:NGS}NGS_merGeneration&amp;#39;()},&lt;br /&gt; executeWhen: ri!executeWhen,&lt;br /&gt; queryLogicalExpression: a!queryLogicalExpression(&lt;br /&gt; operator: &amp;quot;AND&amp;quot;,&lt;br /&gt; filters: {&lt;br /&gt; a!queryFilter(&lt;br /&gt; field: &amp;quot;merType&amp;quot;,&lt;br /&gt; operator: &amp;quot;=&amp;quot;,&lt;br /&gt; value: ri!merType&lt;br /&gt; ),&lt;br /&gt; a!queryFilter(&lt;br /&gt; field: &amp;quot;processStatus&amp;quot;,&lt;br /&gt; operator: &amp;quot;&amp;gt;=&amp;quot;,&lt;br /&gt; value: ri!processStatus&lt;br /&gt; )&lt;br /&gt; },&lt;br /&gt; ignoreFiltersWithEmptyValues: true&lt;br /&gt; ),&lt;br /&gt; pagingInfo: ri!pagingInfo,&lt;br /&gt; fetchTotalCount: true&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Variable not getting refreshed inside a!refreshVariable</title><link>https://community.appian.com/thread/130838?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 12:51:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1079f145-c080-4697-85d7-d39c07fcc49b</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Can you share that code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Variable not getting refreshed inside a!refreshVariable</title><link>https://community.appian.com/thread/130837?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 12:49:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d3103db5-52e5-4d5b-80f2-3369c0f29ddc</guid><dc:creator>ShaliniD</dc:creator><description>&lt;p&gt;no, the expression doesn&amp;#39;t use local variables.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Variable not getting refreshed inside a!refreshVariable</title><link>https://community.appian.com/thread/130836?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 12:44:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:395c13b7-2372-4050-ac60-ab430c3355ee</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Does that expression use local variables? If yes, you need to add a refresh always inside that expression.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>