<?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 Drop down</title><link>https://community.appian.com/discussions/f/user-interface/13771/document-drop-down</link><description>Hi folks, 
 
 Is there a way to implement a document drop down? Not a document picker but a document drop down where documents from a particular folder are displayed and can be chosen. 
 
 TIA. :)</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Document Drop down</title><link>https://community.appian.com/thread/64808?ContentTypeID=1</link><pubDate>Fri, 22 Feb 2019 09:51:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3ca08f3b-b93b-4d09-ad68-b7feea4fc577</guid><dc:creator>Abhay Dalsaniya</dc:creator><description>I could not find getdocumentsfromfolder() function, is it available out of the box? or you are using smart service? could you please suggest.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Drop down</title><link>https://community.appian.com/thread/62519?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 13:49:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4463ac11-45e9-4a14-8505-38f5e7dc991a</guid><dc:creator>chandu</dc:creator><description>Sample Code for your requirement:&lt;br /&gt;
load(&lt;br /&gt;
  local!docCV:getdocumentsfromfolder(rootFolder:tofolder(157680),recursiveSearch:false),&lt;br /&gt;
  local!docCL:apply(document(_,&amp;quot;name&amp;quot;),local!docCV),&lt;br /&gt;
  a!dropdownField(&lt;br /&gt;
    label:&amp;quot;following documents are available&amp;quot;,&lt;br /&gt;
    choiceLabels: local!docCL,&lt;br /&gt;
    choiceValues: local!docCV,&lt;br /&gt;
    value:ri!doc,&lt;br /&gt;
    saveInto: ri!doc,&lt;br /&gt;
    placeholderLabel: &amp;quot;--Select Doc--&amp;quot;&lt;br /&gt;
  )&lt;br /&gt;
)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Drop down</title><link>https://community.appian.com/thread/62508?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 09:09:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9349e682-aa93-4086-986a-ac35535ffa0c</guid><dc:creator>Harsha Sharma</dc:creator><description>Try apply(document(_,&amp;quot;name&amp;quot;),getdocumentsfromfolder(folderId)) to have document names in choice labels instead of Ids.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Drop down</title><link>https://community.appian.com/thread/62507?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 08:48:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7370bc56-bba5-4cf4-9b89-3b3ef9a155df</guid><dc:creator>apoorvam</dc:creator><description>Hi Harsha,&lt;br /&gt;
&lt;br /&gt;
By implementing your approach, the values of the drop down are in the form of document IDs. ex: [Document: 22081]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Drop down</title><link>https://community.appian.com/thread/62506?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 08:33:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:52d97a9b-92ec-4ac1-b019-f539cf922c1a</guid><dc:creator>Harsha Sharma</dc:creator><description>You can make use of getdocumentsfromfolder() function by passing the folderId, from which documents are to be fetched and listed in the dropdown. Then simply can make use of the list returned in choiceLabel and choiceValue parameters of the dropdown. &lt;br /&gt;
&lt;br /&gt;
Hope this helps.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Drop down</title><link>https://community.appian.com/thread/62505?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 08:20:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:827662ba-b882-440f-b8d4-aff4cfc1f0ef</guid><dc:creator>apoorvam</dc:creator><description>I have tried this code and the values dont poplate on the dropdown: &lt;br /&gt;
&lt;br /&gt;
load(&lt;br /&gt;
  local!doc: null,&lt;br /&gt;
  local!doc: tointeger(&lt;br /&gt;
    a!forEach(&lt;br /&gt;
      items: cons!FOLDER__ID,&lt;br /&gt;
      expression: folder(&lt;br /&gt;
        fv!item,&lt;br /&gt;
        &amp;quot;documentChildren&amp;quot;&lt;br /&gt;
      )&lt;br /&gt;
    )&lt;br /&gt;
  ),&lt;br /&gt;
  with(&lt;br /&gt;
    a!dropdownField(&lt;br /&gt;
      label: &amp;quot;Document&amp;quot;,&lt;br /&gt;
      choiceLabels: {&lt;br /&gt;
        a!forEach(&lt;br /&gt;
          items: local!doc,&lt;br /&gt;
          expression: document(&lt;br /&gt;
            documentId: fv!item,&lt;br /&gt;
            property: &amp;quot;name&amp;quot;&lt;br /&gt;
          )&lt;br /&gt;
        )&lt;br /&gt;
      },&lt;br /&gt;
      choiceValues: {&lt;br /&gt;
        a!forEach(&lt;br /&gt;
          items: local!doc,&lt;br /&gt;
          expression: document(&lt;br /&gt;
            documentId: fv!item,&lt;br /&gt;
            property: &amp;quot;name&amp;quot;&lt;br /&gt;
          )&lt;br /&gt;
        )&lt;br /&gt;
      },&lt;br /&gt;
      placeholderLabel: &amp;quot;Select a document...&amp;quot;,&lt;br /&gt;
      value: local!doc,&lt;br /&gt;
      saveInto: local!doc&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Drop down</title><link>https://community.appian.com/thread/62504?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 08:16:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b7f87701-a193-4427-83bb-b7e392cde751</guid><dc:creator>Shanmukha</dc:creator><description>I think you can have something like this, Document names as a choice labels and document numbers as choice value. This way you can give it a try.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>