Perform actions on selected tasks
Last updated
Last updated
This page walks you through building an activity timeline component that lists selectable tasks based on a GetRecords collection. Then, we will display only selected tasks on another screen using the Avonni List component.
The final result looks like this:
The steps to pass the RecordID are as follows:
The very first step starts with creating our Get Records collection to ask Flow Builder to fetch all the Task records by following the below steps:
Add a Get Records element to fetch all tasks data
Enter a collection Label > GetTasks
Add the Task Object
Select "None - Get all Task Records
" in the condition requirements field
Select "All Records
" regarding the number of records to display
Click "Done"
Add a screen element
Enter a screen label
Drag the Activity Timeline component from the components list to our screen flow (located under the custom section)
Enter an API Name. For example, ActivityTimeline.
Click on the Open Component Builder button to access all the settings for the Activity Timeline component
Enter a Title for the component (e.g: Tasks)
Under the Data Source section, select Variable to assign our previously created Get Records collection
Under Source Collection, click on the GetTask collection we created in step 1
Under the Data Mapping section, let's do our fields mapping
Title => Task.Subject
Description => Task.Description
Name => Task.Id (Activity ID)
Icon Name => standard:task (switch to Manual to select an icon manually)
Date => Task.DueDate
Has Checkbox => Yes (switch to Manual to select the toggle)
Add a Get record collection:
Label: GetSelectedTasks
Object: Task
Filter: Use the IN operator with value “activityTimeline.selectedItemNames“
Now, we will add a new screen flow to display only selected tasks from our first screen.
Add a screen element
Enter a screen label
Enter an API Name. For example, selectedTasks
Drag the Avonni List Component to our screen flow
Open the Component Builder to access all Settings
Add a bottom divider
Select a variable Data Source.
Select the source collection "GetSelectedTask" created in step 4
Configure the data mapping:
Label: Subject
Name: Activitiy ID
Description: Description
Avatar > Icon Name > Manual: Standard:task2
Avatar > Icon Size > Medium
Add an info label (optional)
Screen:
List component
Display selected tasks in the list