I'm trying to create a flow that allows the user to log multiple calls for multiple different contacts. The ideal scenario would go like this:
- User initiates flow from a button on the Account object.
- The flow gets records of contacts associated with that account, collecting contact ID, full name, and location/branch name. Names are generally unique, however, multiple people can work at the same branch. Name and ID fields are standard, branch field is just a text field that was manually filled in upon contact creation.
- The flow shows a screen asking the user to select the branch the contact works at. The user selects one branch.
- The flow shows the user a multi-select picklist of contacts that work at that location. The user selects the contacts to have a call logged.
- The flow provides a screen for the user to fill out the subject and description of the call.
- The Log A Call action fires and logs calls on the selected contacts.
Everything works perfectly, except for the selecting a branch step. Since the branches are not objects, just text fields, when I store their values, I have no way of filtering out duplicates. For example, say the parent company has three branches named West Elm, Blue Lakes, and Green Hills. Three contacts work at West Elm, two at Green Hills and two at Blue Lakes. When the picklist showing the branches to choose from are shown, there will be an equal number of contacts and branches. So the list looks like this:
I would like the list to show only each branch name once. As the flow is now, no matter which West Elm the user selects, it pulls all of the related contacts correctly. The list just looks very bad with these duplicates. Also, since these picklists can only show up to 200 options, when the company has more than 2oo contacts, the flow runs the risk of not displaying all the branches, depending on how many contacts work at each branch and how the list is sorted.
I'm starting to believe there will need to be changes made to the objects themselves in order to get the picklists to be unique. I can't create account-specific picklists with all the branches associated, due to that number changing and we cannot create a new account record type for every company that's in our system. I don't think rollup helper will be useful either since this is not a number field.
If someone knows how to apply a formula or other workaround to stop the picklist from showing these duplicates, I would greatly appreciate it!