<?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>Change All Values in a Dictionary to False</title><link>https://community.appian.com/discussions/f/user-interface/21978/change-all-values-in-a-dictionary-to-false</link><description>Hi everyone. Could someone help me with changing all the values in a dictionary? Basically, when a user clicks a a!dynamicLink we want all the values in a dictionary to go from TRUE to FALSE. I&amp;#39;ve tried using a loop with no success. 
 Any suggestions</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Change All Values in a Dictionary to False</title><link>https://community.appian.com/thread/85979?ContentTypeID=1</link><pubDate>Tue, 21 Sep 2021 17:20:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:49c18613-c411-46de-971c-255aa8d3cc22</guid><dc:creator>JDinMD</dc:creator><description>&lt;p&gt;Worked just the way we needed it. Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change All Values in a Dictionary to False</title><link>https://community.appian.com/thread/85978?ContentTypeID=1</link><pubDate>Tue, 21 Sep 2021 17:20:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cf07ae05-4190-4cf7-94be-aa781992428c</guid><dc:creator>JDinMD</dc:creator><description>&lt;p&gt;We are using the latest version. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change All Values in a Dictionary to False</title><link>https://community.appian.com/thread/85959?ContentTypeID=1</link><pubDate>Tue, 21 Sep 2021 13:30:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3a69f403-f6f4-4a71-b00e-18fc55cbc1fb</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;What version of Appian are you running? There is the a!update() function that allows you to update individual attributes. Here&amp;#39;s an example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data: {
    { id: 1, name: &amp;quot;A&amp;quot;, isActive: true },
    { id: 2, name: &amp;quot;B&amp;quot;, isActive: true }
  },
  a!forEach(
    items: local!data,
    expression: a!update(fv!item, &amp;quot;isActive&amp;quot;, false)
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;...and the result is:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[id:1,name:A,isActive:false]; [id:2,name:B,isActive:false]&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change All Values in a Dictionary to False</title><link>https://community.appian.com/thread/85958?ContentTypeID=1</link><pubDate>Tue, 21 Sep 2021 13:27:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cf9a6d43-1cda-4d32-b972-1d4fc25253b9</guid><dc:creator>vimalkumars</dc:creator><description>&lt;p&gt;You can try something similar to below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!items: {a!map(isActive: true), a!map(isActive: false()), a!map(isActive: true)},
  a!linkField(
    links: a!dynamicLink(
      label: &amp;quot;RESET&amp;quot;,
      saveInto: {
        a!save(
          local!items.isActive,
          repeat( length(local!items), false())
        )
      }
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>