<?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>Check if all items in array are matched</title><link>https://community.appian.com/discussions/f/general/26750/check-if-all-items-in-array-are-matched</link><description>Do you have any idea on how to check if all values in array matched in appian? 
 example 
 arrayValue = {true,true,true} 
 returns &amp;quot; All Elements are Same &amp;quot; 
 else returns &amp;quot;Not the same&amp;quot;</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Check if all items in array are matched</title><link>https://community.appian.com/thread/109555?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 10:03:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8b3e5532-a2c5-43af-bb9f-3e8fb89084de</guid><dc:creator>S&amp;#248;ren Juul</dc:creator><description>&lt;p&gt;Yes, that is my recommendation too :-)&lt;/p&gt;
&lt;p&gt;Since this way of using &amp;quot;union&amp;quot; is so common - and unintuitive, I have wrapped it into a function removeDuplicates:&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1678961012348v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Check if all items in array are matched</title><link>https://community.appian.com/thread/105027?ContentTypeID=1</link><pubDate>Thu, 01 Dec 2022 11:39:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:836b200e-edcd-437a-a39f-2c8e3d0d3e87</guid><dc:creator>Alex Boerescu</dc:creator><description>&lt;p&gt;Another option using difference:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!arrayval: {true, true, 1, &amp;quot;hello&amp;quot;},
  if(
    length(difference(local!arrayval,local!arrayval))=0,
    &amp;quot;All values are the same&amp;quot;,
    &amp;quot;All values are not the same&amp;quot;
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Check if all items in array are matched</title><link>https://community.appian.com/thread/105017?ContentTypeID=1</link><pubDate>Thu, 01 Dec 2022 09:31:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9e04a378-b2b6-4409-bcce-887de8c6667b</guid><dc:creator>peanut</dc:creator><description>&lt;p&gt;Thank You Very much &amp;lt;3&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Check if all items in array are matched</title><link>https://community.appian.com/thread/105014?ContentTypeID=1</link><pubDate>Thu, 01 Dec 2022 07:41:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:87a2773c-4157-458c-8dd7-7bba8465d597</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!arrayval: {true, true, 1, &amp;quot;hello&amp;quot;},
  if(
    count(union(local!arrayval, local!arrayval)) = 1,
    &amp;quot;All Values are same&amp;quot;,
    &amp;quot;All values Not Same&amp;quot;
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Check if all items in array are matched</title><link>https://community.appian.com/thread/105013?ContentTypeID=1</link><pubDate>Thu, 01 Dec 2022 06:46:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3e5dc0b4-a014-45fd-9843-86d18df6a2fb</guid><dc:creator>rahata9316</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!arrayval: {true,true,false},
  local!actuallength: length(local!arrayval),
  local!matchedlength: length(wherecontains(local!arrayval[1],local!arrayval)),
  if(local!matchedlength =local!actuallength ,&amp;quot;All Values are same&amp;quot;,&amp;quot;All values Not Same&amp;quot; )
  /*contains(local!arrayval,true)*/
  /*if(contains(local!arrayval,true),&amp;quot;Matched&amp;quot;,&amp;quot;Not Mached&amp;quot;)*/
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>