Related Topics
DropdownValue Object Class
This object represents a single name/value pair for use in a DropDown and similar controls.
Properties
PROPERTY NAME |
DATA TYPE |
DESCRIPTION |
---|---|---|
Text |
String |
The text to display for the DropDown entry |
Value |
String |
The actual value to use when using the DropDown entry |
Methods


This API will return the list of name/value pairs for a dropdown as a List<DropDownValue> class.
Parameters
BP: The Process Director BP Object
DDID: The ID of the DropDown Object from which to retrieve the DropDownValue List.
Returns
List<DropDownValue>: The list of name/value pairs for the DropDown.
Example
var cDD = CurrentForm.FormControl("DropDownPick").Value;
// If "DropDownPick" is a ContentPicker on a Form
var ddlist = DropDownValue.GetDropDownValues(bp, cDD);
bp.log0("Number of entries in the DropDown: " + ddlist.Count);


This API sets the list of DropDown name/value pairs.
Parameters
Values: The list of name/value pairs for the DropDown as a List<DropDownValue> (or other IEnumerable) class.
Returns
Boolean: Whether or not the call could set the DropDownObject's values.
Example
var ddvlist = new List<DropDownValue>();
ddvlist.Add(new DropDownValue("[Select a State]", ""));
ddvlist.Add(new DropDownValue("California", "CA"));
ddvlist.Add(new DropDownValue("Texas", "TX"));
var cDD = CurrentForm.FormControl("DropDownPick").Value;
// if "DropDownPick" is a ContentPicker on a Form
var dd = DropDownObject.GetDropDownByDDID(bp, cDD);
dd.SetDropDownValues(ddvlist);
// Will set DropDown to contain
// "[Select a State]:''",
// "California:CA",
// "Texas:TX"
Constructor
Parameters
Text: The text to display for the DropDown entry
Value (Optional): The actual value to use when using the DropDown entry. If the constructor doesn't receive this parameter, it will use the 'Text' parameter for the Value as well.
Example
// Create a value with Text:"[Select a Value]" and Value:""
var ddv1 = new DropDownValue("[Select a Value]", "");
// Creates a value with Text:"Item1" and Value:"Item1"
var ddv2 = new DropDownValue("Item1");
// Creates the same DropDownValue as above ("Item1"/"Item1")
var ddv3 = new DropDownValue("Item1", "Item1");
Documentation Feedback and Questions
If you notice some way that this document can be improved, we're happy to hear your suggestions. Similarly, if you can't find an answer you're looking for, ask it via feedback. Simply click on the button below to provide us with your feedback or ask a question. Please remember, though, that not every issue can be addressed through documentation. So, if you have a specific technical issue with Process Director, please open a support ticket.