<?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>Document Search With Partial Name</title><link>https://community.appian.com/discussions/f/general/38222/document-search-with-partial-name</link><description>Hello All, 
 I am trying to create a document search feature where the user is expected to search for documents only with document name as input. I have already tested &amp;quot;Content Tools - findDocumentByName()&amp;quot; function and realized that it only works when</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Document Search With Partial Name</title><link>https://community.appian.com/thread/143902?ContentTypeID=1</link><pubDate>Wed, 25 Dec 2024 18:06:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b78ab15a-b1ac-4378-b1a3-4ceade6d0758</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;Content tools also has the&amp;nbsp;findcontentbyattribute function which allows you to do a search with a wildcard&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!documentNameToSearchFor: &amp;quot;documentName&amp;quot;,
  findcontentbyattribute(
    searchAllContent: true,
    contentType: &amp;quot;document&amp;quot;,
    attributeName: &amp;quot;name&amp;quot;,
    searchCriteria: concat(local!documentNameToSearchFor, &amp;quot;*&amp;quot;)
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/11/pastedimage1735149973212v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Search With Partial Name</title><link>https://community.appian.com/thread/143898?ContentTypeID=1</link><pubDate>Wed, 25 Dec 2024 02:29:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:38597ac7-263b-47aa-b942-dcdf2dd1c82d</guid><dc:creator>sasia0001</dc:creator><description>&lt;p&gt;Try with the below steps&lt;/p&gt;
&lt;p&gt;1) Get documents from the folder&amp;nbsp;using the function fn!getdocumentsfromfolder&lt;/p&gt;
&lt;p&gt;2) Save doc id and docname in local variable.&lt;/p&gt;
&lt;p&gt;3) Apply contains filter in the local!finaloutput variable.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Below is the sample code&lt;/p&gt;
&lt;p&gt;local!finaloutput: a!flatten(a!forEach(&lt;br /&gt; items: local!folderdetails,&lt;br /&gt; expression: a!forEach(&lt;br /&gt; items: fn!getdocumentsfromfolder(fv!item.id, true()),&lt;br /&gt; expression: {&lt;br /&gt; folderid: document(fv!item, &amp;quot;folderId&amp;quot;),&lt;br /&gt; documentid: document(fv!item, &amp;quot;id&amp;quot;),&lt;br /&gt;docname:document(fv!item, &amp;quot;name&amp;quot;)})))&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>