In addition to the flatten function, there is also a picklist function available for use with Salesforce agents. The picklist function returns a single column dataset of the possible values for a picklist typed column in Salesforce.
The flattening function has the following syntax:
PICKLIST( tableName,pickListColumn )
The parameters of the function are defined as follows:
The name of the table from which to return the single column dataset.
The column in the table specified by tableName to return.
You must have data caching with prefetch enabled in your lookup table for the picklist function to work properly. See Caching Lookup Table Queries for details about enabling caching.
The column to return must be a picklist typed column.
The following picklist function returns the dataset of possible values from the LeadSource column in the Opportunity table.
The illustration below shows the Opportunity table.
The picklist function retrieves the LeadSource column.