Skip to main content
Skip table of contents

Multipicklist Value

A Multipicklist value is the representation of a value of a Salesforce pick-list field, allowing multiple selections. It carries all the selected values, their labels, as well as the values and labels of all the other options the pick-list offers.

The various methods available have to be utilized to make any of use of Multipicklist values, as the value as it should not be presented as text or used in Salesforce communication. Generally, the getEntries() and allEntries() methods provide what is needed - either the selected options or all options as a Collection of Maps containing data of each option. Loop through the Collection and use either the value or label, or both, within each of the Maps.      

Related commands

  • record, relatedList& query
    These commands are the producers of Data items, in which Pick-list values with multiple selections may appear in.

Methods

allEntries()

Resolves into a Collection containing Maps representing all the entries, or options, of the pick-list field this value is from. Each entry Map value contains the following keys and String values:

  • value, the API value of the entry.

  • label, the display name of the entry, which is how the entry appears to users in the Salesforce UI. If the setLabelTranslations command has been used to activate a translation, this will be the translated label (if the translation contains it).

  • default, will be "true" for the entry that is the default value of the pick-list, "false" for all others. 

  • active, will be "true" if this entry is active and displayed in the Salesforce UI, "false" if deactivated and hidden.

For example, if looping through the Collection accessed with ${opp.MultitestValue__c.allEntries()} and entry being the variable of the currently iterated item, ${entry.default} could be used to check if the entry is the field's default value.

allLabels()

Resolves into a Collection containing Strings that are the labels of all thepick-list pick-list entries.

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

For example, the expression ${opp.MultitestValue__c.allLabels()} would allow one to loop through the labels of all the pick-list field's options.

allValues()

Resolves into a Collection containing Strings that are the API values of all the pick-list entries.

For example, the expression ${opp.MultitestValue__c.allValues()} would allow one to loop through the API values of all the pick-list field's options.

asList()

Resolves into a Collection of Strings containing the API values of the selected pick-list values. If there are no selected values, the Collection will be empty.

For example, the expression ${opp.MultitestValue__c.asList()} would allow one to loop through the API values of the selections.

contains(String)

Resolves into a Boolean telling whether the given String parameter is one of the selected entries' API values.

For example, the expression ${opp.MultitestValue__c.contains('testValue')} would check if 'testValue' is one of the selected entries.

containsLabel(String)

Resolves into a Boolean telling whether the given String parameter is one of the selected entries' labels.

For example, the expression ${opp.MultitestValue__c.containsLabel('Test Value')} would check if an entry with the label "Test Value" is selected.

getEntries()

Resolves into a Collection containing Maps representing the selected entries, or options, of the pick-list field this value is from. Each entry Map value contains the following keys and String values:

  • value, the API value of the entry.

  • label, the display name of the entry, which is how the entry appears to users in the Salesforce UI. If the setLabelTranslations command has been used to activate a translation, this will be the translated label (if the translation contains it).

  • default, will be "true" for the entry that is the default value of the pick-list, "false" for all others. 

  • active, will be "true" if this entry is active and displayed in the Salesforce UI, "false" if deactivated and hidden.

For example, if looping through the Collection accessed with ${opp.MultitestValue__c.getEntries()} and entry being the variable of the currently iterated item, ${entry.label} would resolve into the (possibly translated) label of the entry.

Using the shorthand form, the expression becomes ${opp.MultitestValue__c.entries}.

getLabels()

Resolves into a String that contains the labels of the selected pick-list values, separated with commas.

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

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

Using the shorthand form, the expression becomes ${opp.MultitestValue__c.labels}.  

rawValue()

Resolves into a String that is the pick-list field value as provided by the Salesforce API, which is all the selected entries' API values separated by semicolons.

For example, the expression ${opp.MultitestValue__c.rawValue()} could return "testValue;testValue2".

JavaScript errors detected

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

If this problem persists, please contact our support.