Selecting One Item or Record from a List or Array in Salesforce Spiff
Functions in Salesforce Spiff commission logic often require that you reference one
item or record in a list or array, such as the first invoice, latest payment record, or
current user. Sometimes you must make sure that you select an item even when the list or
filter contains only one item.
Required Editions
Available in: both Salesforce Classic (not available in all orgs) and Lightning
Experience
Available in: Enterprise, Unlimited, and Developer
Editions
Available for an additional cost in: Professional Edition with Web
Services API Enabled
The choose() function selects a specific item from a list.
The single() function confirms whether a list contains one item and show an error message.
List values in Spiff aren't sorted by any default order. To make sure that you select the appropriate value, combine the choose() function with sort() so that you sort the list values before you select a specific item.
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.