Get list of PDF-files from folder to populate drop-down
Posted: Mon Mar 07, 2016 10:35 am
Hi
I am creating a flow, where I start with a Submit Point.
And I would like to have the user fill out metadata.
One of them should be a dropdown of files from a folder on the Switch-Server.
The contents of the folder will only be pdfs but it the number of pdfs changes over time.
I tried to set the Data values of the dropdown to a script expresision (see code below), but SwitchClient just shows me a text-entry field. If I set values manually, then I get a dropdown.

I hope somebody can help.
I am creating a flow, where I start with a Submit Point.
And I would like to have the user fill out metadata.
One of them should be a dropdown of files from a folder on the Switch-Server.
The contents of the folder will only be pdfs but it the number of pdfs changes over time.
I tried to set the Data values of the dropdown to a script expresision (see code below), but SwitchClient just shows me a text-entry field. If I set values manually, then I get a dropdown.

I hope somebody can help.
Code: Select all
var theDir = new Dir("D:\SB-S\kursussystem-v2\APPROVED");
var theEntries = theDir.entryList("*.pdf", Dir.Files, Dir.Name);
var list = new Array;
for (var i = 0; i < theEntries.length; i++)
list.push(theEntries[i]);
list;