<?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>Need difference set of data from rule input, local variable.</title><link>https://community.appian.com/discussions/f/general/27371/need-difference-set-of-data-from-rule-input-local-variable</link><description>Hi, 
 I have a rule input with multiple rows of data and I also have a local variable with few rows of data. 
 Now I want to find the difference rows of data into a another local variable. 
 Is it possible in appian. 
 Any inputs please.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Need difference set of data from rule input, local variable.</title><link>https://community.appian.com/thread/107343?ContentTypeID=1</link><pubDate>Thu, 02 Feb 2023 16:35:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b9e56790-bad3-467a-891a-1b4cce680b7f</guid><dc:creator>swapnar6405</dc:creator><description>&lt;p&gt;Thanks Chaitanya for your quick help with example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need difference set of data from rule input, local variable.</title><link>https://community.appian.com/thread/107292?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2023 05:19:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3b722e45-af74-4722-a953-64b96e754c8e</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;span class="user-name"&gt;&lt;a class="internal-link view-user-profile" href="/members/swapnar6405"&gt;swapnar6405&lt;/a&gt;,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="user-name"&gt;You can use symmetricDifference() to get the unique values that are there in both set A and set B.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="user-name"&gt;Here is an example&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="user-name"&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data1: {
    a!map(name: &amp;quot;kevin&amp;quot;, age: &amp;quot;23&amp;quot;, gender: &amp;quot;Male&amp;quot;),
    a!map(name: &amp;quot;Rambo&amp;quot;, age: &amp;quot;26&amp;quot;, gender: &amp;quot;Male&amp;quot;),
    a!map(name: &amp;quot;Jude&amp;quot;, age: &amp;quot;33&amp;quot;, gender: &amp;quot;Female&amp;quot;),
    a!map(
      name: &amp;quot;Michelle&amp;quot;,
      age: &amp;quot;21&amp;quot;,
      gender: &amp;quot;Female&amp;quot;
    )
  },
  local!data2: {
    a!map(name: &amp;quot;kevin&amp;quot;, age: &amp;quot;23&amp;quot;, gender: &amp;quot;Male&amp;quot;),
    a!map(
      name: &amp;quot;Fracesca&amp;quot;,
      age: &amp;quot;22&amp;quot;,
      gender: &amp;quot;Female&amp;quot;
    ),
    a!map(name: &amp;quot;Jude&amp;quot;, age: &amp;quot;33&amp;quot;, gender: &amp;quot;Female&amp;quot;),
    a!map(name: &amp;quot;Martin&amp;quot;, age: &amp;quot;53&amp;quot;, gender: &amp;quot;Male&amp;quot;),
    a!map(
      name: &amp;quot;Michelle&amp;quot;,
      age: &amp;quot;21&amp;quot;,
      gender: &amp;quot;Female&amp;quot;
    )
  },
  local!unique: symmetricdifference(local!data1, local!data2),
  { local!unique }
)&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="user-name"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/Symmetric-Difference.png" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need difference set of data from rule input, local variable.</title><link>https://community.appian.com/thread/107288?ContentTypeID=1</link><pubDate>Tue, 31 Jan 2023 21:38:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:72677de7-b502-4c97-93cb-5dd5cf772f6c</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;the cheap and easy way would be to use the difference() function.&amp;nbsp; It&amp;#39;s probably picky about your data type, so it might be necessary to cast the local variable as the CDT type before passing it through that function.&amp;nbsp; Also note that it would return a difference even for the tiniest change in data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>