Skip to main content
Skip table of contents

Picklist Value

A Picklist value is the representation of a value of a Salesforce picklist field. Besides carrying the selected value, its methods allow the selected value's label to accessed, along with the values and labels of all of the picklist's options.

Related commands

  • record, relatedList & query
    These commands are the producers of Data items, in which Picklist values may appear in.

Methods

getEntries()

Resolves into a Collection containing values representing all the entries, or options, of the picklist field this value is from. Each entry value has two properties, value and label, which resolve into Strings telling the entry's API value and label.

For example, if looping through the Collection accessed with ${testValue.getEntries()} and entry being the variable of the currently iterated item, ${entry.value} would resolve into the API value of the picklist entry.

Using the shorthand form the expression becomes ${testValue.entries}.

getLabel()

Resolves into a String that is the label of the selected picklist value. The label is how this picklist value appears to users in the Salesforce UI.

If the setLabelTranslations command has been used to activate a translation, this method will return the translated label (if the translation contains it).

For example, the expression ${testValue.getLabel()} could return "Test value", or "Testiarvo" if a Finnish translation has been set .

Using the shorthand form the expression becomes ${testValue.label}.  

getValue()

Resolves into a String that is the API value of the selected picklist value. If the value appears numeric and you wish to use it as a Number rather than a String, make use of the set command's parser attribute to convert its type.

For example, the expression ${testValue.getValue()} could return "testValue".

Using the shorthand form the expression becomes ${testValue.value}. This method is also the default output of the picklist value, so if being printed onto a document, just ${testValue} would produce "testValue" as well.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.