<?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>Fuzzy Search On Array</title><link>https://community.appian.com/discussions/f/new-to-appian/23360/fuzzy-search-on-array</link><description>Hi, 
 I am trying to do a fuzzy search on a CDT field which is a string array. The array is { &amp;quot;One&amp;quot;; &amp;quot;Five&amp;quot;; &amp;quot;Seven&amp;quot;; &amp;quot;Ten&amp;quot; }. 
 Input: 
 {&amp;quot;Five&amp;quot;,&amp;quot;Seven&amp;quot;} 
 Output: 
 Array of all those CDT items where we have {&amp;quot;Five&amp;quot;} and {&amp;quot;Seven&amp;quot;} and (&amp;quot;Five&amp;quot;,&amp;quot;Seven</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Fuzzy Search On Array</title><link>https://community.appian.com/thread/89751?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2022 22:22:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:43ab413c-4b7d-4f11-9c13-a4a6b580a86c</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Are you looking across a list of lists or across a single list? wherecontains() should work for a single list but you might need something a bit more fancy if you want to compare across multiple lists, like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!data: {
    a!map(id: 1, items: {&amp;quot;One&amp;quot;,&amp;quot;Two&amp;quot;,&amp;quot;Three&amp;quot;}),
    a!map(id: 2, items: {&amp;quot;One&amp;quot;,&amp;quot;Two&amp;quot;,}),
    a!map(id: 3, items: {&amp;quot;Two&amp;quot;,&amp;quot;Four&amp;quot;}),
    a!map(id: 4, items: {&amp;quot;Three&amp;quot;})
  },
  where(
    a!forEach(
      items: local!data,
      expression: sum(wherecontains({&amp;quot;One&amp;quot;, &amp;quot;Three&amp;quot;},touniformstring(fv!item.items)))
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fuzzy Search On Array</title><link>https://community.appian.com/thread/89738?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2022 15:58:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fda6b15a-1d0d-4a62-8d7f-cd2f5f3d8a0f</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Did you try &lt;em&gt;&lt;strong&gt;whereContains()&lt;/strong&gt;&lt;/em&gt;?&amp;nbsp; It will give you the indexes in the larger array that contain any members of the smaller array.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>