Wizard Apprentice – Update Only User Selected Records From a Multi-Select List in Flow
One of the big frustrations people have with Flow is having users select records is a royal pain. There’s no “Lookup” field for a flow screen and searching for records can be messy and inconsistent. Unless you’re prepared to create a custom Lightning Component to embed into a Flow Screen, you’re almost out of luck.
There’s is a way if you’re able to provide a way to limit the possible records.
In this video, I show how you can provide a multi-select field displaying multiple records and then update only the records the user selects. It involves a few tricks and it works best when the potential list of records is small. In my example, the Flow is designed to list records related to a single account.
Pieces of the Flow
Here’s are the elements in the Flow:
- Screen – With a multi-select for users to select records
- Fast Lookup – To lookup the records the user might select
- Loop – To loop through the sObject Collection from the Fast Lookup
- Decision Element – Determine if the individual record being looped was selected
- Screens – 1 to show a record not selected, 1 to ask for the user to input the value to update the selected record
- Assignment – To assign the user input to the sObject Variable
- Assignment – To add to a new sObject Collection for updating records
- Fast Update – Update all the in the update sObject Collection
Behind the Scenes
- Dynamic Choice – Contains list of records for users to choose from. These are the choices of the multi-select field on the first screen
- variable: recordId – input variable to grab the ID of the record when used in a Flow Action
- variable: vrAccountID – variable for the Account ID, default value is recordId
- sObject Collection Variable: vrSoColAssets – Assets in the Fast Lookup. The records should mirror the records in the dynamic choice
- Sobject Variable: vrSoAsset – A single asset record for the loop.
- sObject Collection Variable: vrSoColUpdate – a collection variable to hold vrSoAssets that are going to be updated
- Multi-Select Checkboxes Field: Select_Assets – this is the field on the first screen that uses the dynamic choice
- variable: vrSelectedAssetsIDs – Text Variable which the value is Select_Assets
- Outcome: Selected – This is from the decision element. To determine if a specific record was elected we check to see if vrSelectedAssetIDs contains vrSoAsset.id
Wizard Apprentice Flow Tutorial
How would you use this Flow trick? Do you know of a better way of accomplishing this without writing code? Let me know!
Want to see more videos on Flow? Let me know in the comments what you want to see!
Don’t miss a post! Sign up to receive email notications.
I run this site, the podcast, and my training videos for the community. I do incur some costs. I greatly appreciate if you can help me out by checking out my affiliates and – if you shop amazon – start your search on my site.