<?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>compare 2 Rule inputs</title><link>https://community.appian.com/discussions/f/data/34076/compare-2-rule-inputs</link><description>I have 2 rule inputs one is prevData and another is UpdatedData . I want a rule expression that will compare the two rule inputs and return the different fields and values from prevData rule input . And the I need to add the fields and values to another</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: compare 2 Rule inputs</title><link>https://community.appian.com/thread/129669?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2024 13:07:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ba1250b1-44b5-47b8-9269-f94d52280733</guid><dc:creator>bisheswar01</dc:creator><description>&lt;p&gt;ok ,will follow your steps .Thanks for your response !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: compare 2 Rule inputs</title><link>https://community.appian.com/thread/129668?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2024 13:04:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:11ee5c64-f6cf-441f-a4cf-fb1f08913f05</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Yep. Like I said, you can run a loop by all the fields of the RI using a!keys() function and passing it in a!forEach()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: compare 2 Rule inputs</title><link>https://community.appian.com/thread/129667?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2024 13:02:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:314414ff-b688-49c7-848a-0d241fc29f1d</guid><dc:creator>bisheswar01</dc:creator><description>&lt;p&gt;I need both the fields and the values those are got changed in updatedData.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: compare 2 Rule inputs</title><link>https://community.appian.com/thread/129666?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2024 12:59:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9b7e9b89-6dd7-4839-a80c-cb4125b148e4</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Do you just need to compare if they are same or not? That can be done using a simple equals operator. But if you need specific fields that got changed, you can use a!keys() function, run a loop on the keys and compare the property&amp;#39;s value from&amp;nbsp;&lt;span&gt;prevData with&amp;nbsp;UpdatedData, and add it to a map.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: compare 2 Rule inputs</title><link>https://community.appian.com/thread/129664?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2024 12:56:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5fabc55c-fc0f-418a-8b90-81a5f72ee07f</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;The most simply approach is to just compare field by field while creating the output.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;#39;recordType!AA Category&amp;#39;(
  field1: ri!data1.field1 = ri!data2.field1,
  .
  .
  .
  .
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>