Page 1 of 1
Load information in Submit Point
Posted: Mon Mar 13, 2017 4:21 pm
by dimadev
Hi,
i have a flow that starts whit a Submit Point. The Users upload file in Switch Client and insert info in the field.
I need to insert a Dropdown list menu in Submit Point where information is not always the same. Can i load a XML (or css, txt, xls, or any type) information in the Dropdown list menu?
In this Dropdown list i need insert a customer names. These change every day, but I can export these in any type of file.
Thx for your help.
Good day
PS: I not have a Database module.
Re: Load information in Submit Point
Posted: Mon Mar 13, 2017 4:51 pm
by freddyp
With the Database Module you could indeed populate the drop-down list from an ODBC data source. The only other alternative is the use of a script expression, for which you will need the Scripting Module. Here is a link to a similar case where the values of the drop-down list come from the list of files in a folder:
https://forum.enfocus.com/viewtopic.php ... oint#p4555
If you write the customer names into a text file the following script expression should do the trick (not tested):
Code: Select all
var contents = File.read("path to text file");
var lines = contents.split(String.fromCharCode(10)); //10=line feed
lines;
Note that in a script expression you do not use "return someVariable;", but just "someVariable;"!
Re: Load information in Submit Point
Posted: Mon Mar 13, 2017 4:53 pm
by sander
I would create a txt file or whatever with the entries.
Then create a list, this should get you started as it does the same with a directory listing;
https://forum.enfocus.com/viewtopic.php?t=1321
Edit: don't idle too long

Edit2: Haha, we are even referring to the same topic

Re: Load information in Submit Point
Posted: Mon Mar 13, 2017 6:16 pm
by dimadev
Hi, thx for reply.
I think not having the Scripting Module. I have a "Script Element"... but I think we do nothing with this

Re: Load information in Submit Point
Posted: Mon Mar 13, 2017 6:26 pm
by sander
You don't have to use the scripting module but use a script expression.
I'm not 100% sure but I think the script expression is available without scripting module. Set your Data type to 'Dropdown list', now 'Define script expression' should be available:
