Load information in Submit Point

Post Reply
dimadev
Newbie
Posts: 10
Joined: Sat Dec 17, 2016 4:00 pm

Load information in Submit Point

Post 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.
freddyp
Advanced member
Posts: 1024
Joined: Thu Feb 09, 2012 3:53 pm

Re: Load information in Submit Point

Post 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: viewtopic.php?f=13&t=1321&p=4555&hilit= ... 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;"!
sander
Advanced member
Posts: 276
Joined: Wed Oct 01, 2014 8:58 am
Location: The Netherlands

Re: Load information in Submit Point

Post 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;
viewtopic.php?t=1321

Edit: don't idle too long ;)
Edit2: Haha, we are even referring to the same topic :D
dimadev
Newbie
Posts: 10
Joined: Sat Dec 17, 2016 4:00 pm

Re: Load information in Submit Point

Post 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 :?
sander
Advanced member
Posts: 276
Joined: Wed Oct 01, 2014 8:58 am
Location: The Netherlands

Re: Load information in Submit Point

Post 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:
Image
Post Reply