In the Directories app, you can group results for the List Display view when using the blog layout by selecting any field on the chosen object. Doing so inserts a heading for each group that displays a value of the Salesforce field you are grouping on. You may also define an additional Salesforce field as a subheading to appear below the group heading.
If you wish, you may also enable jump links that will dynamically appear at the top of the results lists. If enabled, the name of each group that appears on the page will be displayed and hyperlinked to take the visitor to that group on the page.
On the List Display view, the groups will appear in alphabetical order with any blank field values appearing as the last group.
To group your results by a field:
- Open the Directories page for which you wish to group the results
- Click on the Options tab
- Click the Parameters - List Display
- For Group By, select the field on the source object by which you wish to sort. The value of this field will be display as the group title in the List Display view
- For Salesforce Field as Subtitle, if you wish, you may identify an additional Salesforce field to be displayed under the group heading using the format ObjectName.FieldName. This is optional.
- In the popup, for Group By, select the field by which you wish to group results
- Click Save
- For Show Group Jump Links, if you wish to dynamically display jump links to a given group at the top of a Directory page, choose Yes. Only groups that have results on a given page will be displayed as a jump link.
- In the main add/edit Directory window, click Save
Example Use Case
As a membership organization, I have a Member Status field on the Account object in Salesforce with values of Gold and Silver. I want to group a Directory of active member by Member Status. For Group By, I select the Member Status field so the words "Gold" and "Silver" appear as headings above each section of results.
This feature is not available for List Display views that use the table layout.