Loading
Salesforce now sends email only from verified domains. Read More
Automate Your Business Processes
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Collection Choice Set Resource

          Collection Choice Set Resource

          Generate a set of choices from an existing collection of records or external data.

          Required Editions

          Field Description
          API Name The requirement for uniqueness applies only to elements within the current flow. Two elements can have the same API name, provided they're used in different flows. An API name can include underscores and alphanumeric characters without spaces. It must begin with a letter and can’t end with an underscore. It also can’t have two consecutive underscores.
          Description Helps you differentiate this resource from other resources.
          Record Collection The collection you want to use to generate the choices. You can reference an Apex-defined collection from an external service, Apex action, or another screen component.

          Configure Each Choice

          For each record that meets the filter conditions, the flow creates a choice using values from the record. Identify which fields to use for each choice’s label and value.

          Field Description
          Choice Label

          Determines which field to use as the label for each generated choice. Select a field that enables users to differentiate between the generated choices.

          Make sure to choose a field that contains data. If the selected field has no value for a given record, the corresponding choice’s label is blank at run time.

          This text is what's used to represent the choice in display text screen components and text formula resources.

          Data Type Data type of the choice’s value. You can’t change the data type of a previously saved collection choice set.
          Choice Value

          Determines which field’s value to store when the user selects this choice at run time. The value is determined by the most recent user selection of a choice within the generated set.

          Data Type determines the available options. If you don’t select a field as the choice value, the choice label is used instead.

          This text is what's used to represent the choice in all screen components except display text screen components and all types of formula resources except text formula resources.

          Tip
          Tip In most cases, set the choice label to Name and the choice value to ID.
          Example
          Example

          Collection choice sets are useful when a flow reuses the same dataset over multiple screens. For example, you’re designing a support flow for a company’s IT department that handles support requests related to employee hardware. The flow references the same employee hardware data over several screens. To get the employee hardware information, use a Get Records action, which populates a record collection. To define the conditions relevant to the support request, use a collection filter on the record collection. Next, to display the user choices, add a collection choice set that uses the filtered collection. Create a relevant collection filter and collection choice set for each branch of the support flow.

          With collection choice sets, the server is queried only when the Get Records element is first executed. In comparison, record choice sets require a server query with each use.

          Choice Value vs. Choice Label Used at Runtime

          Where Which Is Used
          In all screen components except Display Text components. Value
          In all resources except text Formulas. Value
          Display Text components Label
          Text Formula resources Label
           
          Loading
          Salesforce Help | Article