Vertical List with Actions
Overview
This tutorial will teach you how to make a vertical list with interactive buttons using the Avonni List component. By the end, you'll have an excellent new list ready for your projects.
Let's dive in
Final Result
![](https://flow.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252FPwGOs6w4Wh2Q0llUjPNG%252F2023-02-15_16-33-53.png%3Falt%3Dmedia%26token%3De66584cd-34de-4be8-b85e-9e40cda51558&width=768&dpr=4&quality=100&sign=161c7fc0&sv=1)
Steps
Goal: We want to gather a list of contacts linked to a specific account in Salesforce.
How it Works:
Think of it like a search: We'll use a screen flow element called "Get Records" to search through your Salesforce contacts.
Label: We'll call this search "GetContacts" to keep it organized.
Filtering: We only want contacts attached to the current account, so we'll tell the tool to look for the "Account ID" and match it to the account we're currently viewing ({!recordID.Id}).
1. Add a screen component and the Avonni List
Add a Screen element
Enter an API name
Hide Header and Footer (if needed)
Drag the Avonni List component
Click the "Open Component Builder" button to access all the Avonni List component's settings.
![](https://flow.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252FlSptFeN7ClHA1scVnoiv%252F2024-03-24_09-32-46.png%3Falt%3Dmedia%26token%3De46fb4a9-dc28-461e-8480-03931bd47131&width=768&dpr=4&quality=100&sign=adf2f248&sv=1)
2. Data Source configuration
The Data Source section is where you tell the Avonni List component what kind of Salesforce data it should display and how to find the correct information. This tutorial focuses on displaying Contact records relevant to a specific Account.
Step-by-Step Instructions
Select Salesforce Object: Choose the "Contact" object from the data source options. This tells the component to focus on Contact records.
Create a Query: We'll build a query directly within the component to fetch the relevant Contacts. This is where we make sure the list is tailored to our needs.
Apply a Filter: Set up a filter with these conditions:
Field: "Account ID"
Operator: "Equal"
Value: {!recordId.Id} (This flow variable represents the current Account record's ID)
Explanation of the Filter: By using the above filter, we are telling the component only to display Contact records where the "Account ID" field matches the ID of the Account we are currently viewing. This ensures the list shows the correct, related Contacts.
![](https://flow.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252F8unrTimwUMqtnpz1bZny%252F2024-03-24_21-06-22.png%3Falt%3Dmedia%26token%3D17129bb1-4da0-4860-9053-053ceb07499e&width=768&dpr=4&quality=100&sign=b4717ecb&sv=1)
3. Data Mapping configuration
The Data Mapping section is where you "translate" your Salesforce data into the visual format of your Avonni List. You'll decide which Salesforce fields (like "Name" or "Title") should be displayed in specific parts of your list items.
Step-by-Step Instructions:
Map the Label:
Find the "Label" attribute for your list items.
Map it to your Salesforce Contact data's "Full Name" field. This means the contact's full name will be the main text of each list item.
Map the Description:
Locate the "Description" attribute for your list.
Map it to the "Title" field from your Salesforce Contact data. This puts the contact's job title under their name as a descriptive line.
Continue Mapping:
Follow the same pattern for other information you want to display in your list. Map the right Salesforce fields to the corresponding Avonni List attributes.
Example: You might want to map an email field or phone number field to be displayed. The power is in your hands.
![](https://flow.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252FrNqGdo2KRyadmuMWPIbC%252F2024-03-24_21-14-58.png%3Falt%3Dmedia%26token%3D74dd2997-536c-4971-9166-5ec12ac3b310&width=768&dpr=4&quality=100&sign=3f18d73a&sv=1)
4. Customizing Your Avonni List
Get the Look You Want
Now that we've connected your list to Salesforce, let's make it look great and add useful features! Here's what you can customize:
Dividers: Add a "bottom divider" to create clear visual separation between list items.
![](https://flow.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252FI5xUI4CbPqyoDBxyNXUT%252F2024-03-24_21-27-16.png%3Falt%3Dmedia%26token%3D45f4f526-c7d9-4a97-8fd8-4ac07f472fe4&width=768&dpr=4&quality=100&sign=904749c&sv=1)
Clickable Items: Make your list items links! You can then add an interaction that tells the system what happens when a user clicks (for example, opening a record).
![](https://flow.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252F67rgId8u9cVH0d1yM878%252F2024-03-24_21-27-47.png%3Falt%3Dmedia%26token%3D55f3f83c-9854-45e7-aa5f-bedde837612f&width=768&dpr=4&quality=100&sign=201eb905&sv=1)
Layout: Choose a column layout to control the number of items displayed per row, tailoring the look to your needs.
![](https://flow.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252FDFSxeQiRlMvnZfvdudSt%252F2024-03-24_21-28-26%2520%281%29.gif%3Falt%3Dmedia%26token%3Ddce1f19f-57c7-41d0-b3a8-45337c2c7a3e&width=768&dpr=4&quality=100&sign=1895ae74&sv=1)
Item Actions: Provide users with quick options for each list item. In our example, we'll add "Change Owner," "Edit," and "Delete" actions for each Contact.
5. Creating Item Actions
Make your list more powerful! Item actions let users take quick actions directly from each item in your list. Here's how to add them:
Expand 'Actions' Section: Find the "Actions" section of the Avonni List configuration.
![](https://flow.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252Fg2sICn9QjlowdcseJtdu%252F2024-03-26_20-17-33.png%3Falt%3Dmedia%26token%3Dfbd6795e-7501-4e3f-9c7a-bee30f8fc874&width=768&dpr=4&quality=100&sign=e0cbc0b4&sv=1)
Add Item Actions: Click "Add Item Actions" to create action buttons.
Label and Icons: For each action, give it a clear label (like "Change Owner") and choose a fitting icon if you'd like.
![](https://flow.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252FEfnH4Do7ph1xQzTUz1nH%252F2024-03-26_20-18-38.png%3Falt%3Dmedia%26token%3D29a53483-f482-4013-9209-ad47fac8a0fb&width=768&dpr=4&quality=100&sign=20400749&sv=1)
6. Making item actions functional
Your new action buttons look great, but they don't do anything yet. Let's fix that!
Interactions are Key: The "Interactions" tab is where you'll define what happens when a user clicks those buttons.
Possibilities: You could:
Ready to Dive In? Let's head to the "Interactions" tab and start making those actions do their magic!
![](https://flow.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252F5EOj9SflWltPX78tdC5P%252F2024-03-26_20-26-11.png%3Falt%3Dmedia%26token%3D9b3504fb-dec7-44b6-b6f6-b5644141012d&width=768&dpr=4&quality=100&sign=211fb2ad&sv=1)
Last updated