<?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 Help on Expression Rule!!</title><link>https://community.appian.com/discussions/f/rules/28644/need-help-on-expression-rule</link><description>From the above pic, 
 in the local variables bankruptcy there will be constant 4 values and in the local variable creditPublicRecord there will be some values can be null or more than 1 value. 
 Here we have to compare the creditPublicRecord values with</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Need Help on Expression Rule!!</title><link>https://community.appian.com/thread/112582?ContentTypeID=1</link><pubDate>Thu, 11 May 2023 12:49:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9cf31b0c-6a77-4643-9513-452786657063</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Or like&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!bankruptcy: {&amp;quot;Chapter1&amp;quot;, &amp;quot;Chapter1&amp;quot;, &amp;quot;Chapter3&amp;quot;, &amp;quot;Chapter4&amp;quot;},
  local!creditPublicRecord: { &amp;quot;Test&amp;quot;, &amp;quot;Chapter1&amp;quot;, &amp;quot;Chapter2&amp;quot;, &amp;quot;Other&amp;quot; },
  
  length(wherecontains(local!creditPublicRecord, local!bankruptcy))
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1683809380597v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need Help on Expression Rule!!</title><link>https://community.appian.com/thread/112574?ContentTypeID=1</link><pubDate>Thu, 11 May 2023 12:31:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ead022a6-2193-432a-9208-d2d62b7c1ad8</guid><dc:creator>sanchitg0002</dc:creator><description>&lt;p&gt;Is this what you need?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!bankruptcy: {&amp;quot;Chapter1&amp;quot;, &amp;quot;Chapter1&amp;quot;, &amp;quot;Chapter3&amp;quot;, &amp;quot;Chapter4&amp;quot;},
  local!creditPublicRecord: { &amp;quot;Test&amp;quot;, &amp;quot;Chapter1&amp;quot;, &amp;quot;Chapter2&amp;quot;, &amp;quot;Other&amp;quot; },
  a!forEach(
    local!creditPublicRecord,
    a!map(
      item: fv!item,
      count:count(where({fv!item} = local!bankruptcy))
    )
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img height="183" src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1683808342088v1.png" width="188" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need Help on Expression Rule!!</title><link>https://community.appian.com/thread/112567?ContentTypeID=1</link><pubDate>Thu, 11 May 2023 11:41:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:86155839-cf00-4151-98f7-89b86816bfa2</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Is this like an intersection of the two lists of values? If yes, there is an intersection function in Appian. Then count the items in the result.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need Help on Expression Rule!!</title><link>https://community.appian.com/thread/112566?ContentTypeID=1</link><pubDate>Thu, 11 May 2023 11:40:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:01f43c64-8984-42a5-91c7-a5386ecc0a1a</guid><dc:creator>Shaik Gousi</dc:creator><description>&lt;p&gt;I have to compare each and every value of creditPublicRecord with the constant values of bankruptcy.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;for example from the above snap,&lt;/p&gt;
&lt;p&gt;local!creditPublicRecord has one value(judgement) and we have to check if that &amp;quot;judgement&amp;quot; matches with the bankruptcy value and if it matches then we need to count the number of matches. As there is no judgement in the bankruptcy so count is &amp;quot;0&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If local!creditPublicRecord has these values{&amp;quot;judgement&amp;quot;,&amp;quot;BankruptcyChapter11&amp;quot;,&amp;quot;BankrptcyChapter7&amp;quot;,&amp;quot;Other&amp;quot;} then we have to check how many times the values of local!bankruptcy matches the values of local!creditPublicRecord.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need Help on Expression Rule!!</title><link>https://community.appian.com/thread/112565?ContentTypeID=1</link><pubDate>Thu, 11 May 2023 11:32:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4dfb435c-99c7-404b-bfd7-91504a31b4be</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;You can compare both of these just by using the = operator. Try local!&lt;span&gt;bankruptcy&amp;nbsp;= local!creditPublicRecord&amp;nbsp;and it will give you the result. If you want to compare them in any other way, then please mention it.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>