When creating a payout rule, sometimes you need a function that returns a list or array instead of a single data point. These list or array functions are typically used within other functions to create a formula that calculates a single final output.
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
For example, see all the quotas from a specific team and then use the sum of the resulting array as a worksheet calculation. Or, create a datasheet field that lists all reps on a specific team and then returns the number of reps.
Functions that return lists or arrays can consume more processing memory than normal calculations that just return one data point. To make your system as efficient as possible and keep the time it takes to recalculate your statements short, turn off tracing for these calculations.
Lists versus Arrays
In Designer, lists and arrays have specific meanings.
A list is the output of a function or formula that returns all records in an object for the items that qualify. For example, the members() function returns a list of members in a team.
=members("AE - North America")
The list shows only the name of the object that the function queries. In this example, only the label User appears for each item returned because the function returns all user records for members of the team. A user record contains several attributes that aren't included in the list, such as, ID, Name, Effective Date, and so on.
An array is the output of a function or formula that shows the one data element you specify in the function for every returned record. For example, the transform_list() function returns an array of the members list and shows the value of a specific attribute for each user, such as their name.
=transform_list(members("AE - North America"), Name)
In this example, the transform_list() function returns each user's name but doesn't show any of the other attributes from each User record.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
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.