<?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>Distinct documents in document picker</title><link>https://community.appian.com/discussions/f/user-interface/21874/distinct-documents-in-document-picker</link><description>Hi guys, 
 I tried to use document picker to select documents, but its selecting the same document multiple times. I want the selected documents to be distinct. Thanks for the solutions in Advance.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Distinct documents in document picker</title><link>https://community.appian.com/thread/85752?ContentTypeID=1</link><pubDate>Wed, 15 Sep 2021 03:52:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:170d2dfb-4908-49b1-bad9-25b764d7a3d0</guid><dc:creator>kavyanatrajan</dc:creator><description>&lt;p&gt;Thanks for the reply. I have another requirement like If my list of document has {Horror, Romance,Fantasy,Mystery} and I chose Horror from the picker , for the next time when I search for another genre, I don&amp;#39;t want Horror in the list. I asked some suggestions and tried using difference and remove options , Neither of it is working. Can you help me with this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distinct documents in document picker</title><link>https://community.appian.com/thread/85750?ContentTypeID=1</link><pubDate>Wed, 15 Sep 2021 02:39:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:72d2b6de-160b-436f-b2ab-76b2e9801a0b</guid><dc:creator>Selvakumar Kumarasamy</dc:creator><description>&lt;p&gt;Agreed! I just referenced the code in the question &amp;amp; missed this one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distinct documents in document picker</title><link>https://community.appian.com/thread/85749?ContentTypeID=1</link><pubDate>Tue, 14 Sep 2021 19:00:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1497c625-bdb8-43cf-b2ff-239ff678201e</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;FYI you shouldn&amp;#39;t have to save into local!documents twice like this.&amp;nbsp; That&amp;#39;s what &amp;quot;save!value&amp;quot; is for --&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;saveInto: {
  a!save(
    local!documents,
    union(save!value, save!value)
  )
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distinct documents in document picker</title><link>https://community.appian.com/thread/85723?ContentTypeID=1</link><pubDate>Tue, 14 Sep 2021 05:29:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6c66dc65-c0fd-4fe9-8d26-b265718cf797</guid><dc:creator>kavyanatrajan</dc:creator><description>&lt;p&gt;Thanks that works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Distinct documents in document picker</title><link>https://community.appian.com/thread/85722?ContentTypeID=1</link><pubDate>Tue, 14 Sep 2021 05:22:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d9ec75ea-f358-45cd-b7c0-402fcfb8db79</guid><dc:creator>Selvakumar Kumarasamy</dc:creator><description>&lt;p&gt;Hi Kavya,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A union() in the save into might help to get distinct documents:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!documents,
  a!pickerFieldDocuments(
    label: &amp;quot;Document Picker&amp;quot;,
    labelPosition: &amp;quot;ABOVE&amp;quot;,
    folderFilter: tofolder(3244),
    value: local!documents,
    saveInto: {
      local!documents,
      a!save(
        local!documents,
        union(local!documents, local!documents)
      )
    },
    maxSelections: 3,
    validations: {}
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As far as I know, we cannot restrict the document picker to not show selected values again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>