Populating a checkpoint metdata dropdown list with multiple values

Post Reply
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Populating a checkpoint metdata dropdown list with multiple values

Post by gabrielp »

Hi,

I'd like to set dropdown options programmatically. I can't figure out how to do this.



I wrote a script which generated a string with 'n' between each value, then in my dropdown list for "Data type" i selected multi-line text with variables and dropped the PrivateData key for that multi-line string in there, hoping that would work -- but it didn't.



Next I tried making an external XML dataset that looks like this:





email1

email2




But then when I chose "Data type" "define values from a dataset", it would not let me build a path for the parent "emails" node. Only one of the individual emails.



I'm trying to build a dropdown list that could have multiple options. The dropdown values are the result of a query so they cannot be hard coded. Is this not possible?
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
compendio
Member
Posts: 22
Joined: Tue Feb 28, 2012 9:45 am

Populating a checkpoint metdata dropdown list with multiple values

Post by compendio »

Gabriel,



I did something similar in the Submit point and fill the dropdown with a script expression:



function getHfbfFtpDestination() : string {

var basePath = 'D:/EnfocusSwitch/flowConfiguration/';

var xmlConfig = new Document(basePath + s.getFlowName() + '.xml');

var folderList = '';

var delimiter = '';



var rootNode = xmlConfig.getDocumentElement();

var nodeList = rootNode.evalToNodes('directoryList/destinationDirectory', null);



for (var i=0; i





HFBF_PU_Lieferung_November_2014

HFBF_PU_Lieferung_Oktober_2014

HFBF_PU_Lieferung_September_2014







Best regards,

Thomas
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Populating a checkpoint metdata dropdown list with multiple values

Post by freddyp »

@Gabriel: you are using "Define values from dataset" which means you are in a drop down list in a Checkpoint. Taking multiple values from an XML works, but you have to choose "Text indexed" as the resulting data type. If it is greyed out when using "XML location path", switch to "XPath expression".



@Compendio: in a submit point there is no dataset yet and then your method is indeed the way to go.



Freddy
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Populating a checkpoint metdata dropdown list with multiple values

Post by gabrielp »

Thank you both!



I was able to work it out with XPath using "Text indexed"
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
Post Reply