0

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:

  1. User initiates flow from a button on the Account object.
  2. 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.
  3. The flow shows a screen asking the user to select the branch the contact works at. The user selects one branch.
  4. 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.
  5. The flow provides a screen for the user to fill out the subject and description of the call.
  6. 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:

West Elm

West Elm

West Elm

Green Hills

Green Hills

Blue Lakes

Blue Lakes

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!

0

Unfortunately, this is much more difficult in flows than it should be. Since you can't create a picklist choice set from an arbitrary collection of values, there's no way using the basic flow elements to remove duplicates from your list: they have to be deduped at the object level

Having a Salesforce user manually type the branch into a text field also causes other data integrity issues, since a user could mis-type it, or enter an invalid value.

You would be better off here to either:

  1. Use a picklist for the Branch field on the contact, and then use a picklist choice set in your flow. This is a good option if you have a relatively short list of branches, they don't change very often (since an admin has to update the picklist), and you only care about the branch name. You've already indicated that this isn't really an option for you.
  2. Use a custom object for Branch, use a lookup for the Branch field on the contact, and then use a record choice set in your flow. This might be a good option for you, since your Branch object could include a lookup or master detail reference to the account, and you could use lookup filters on the contact to ensure only the relevant branches are displayed. It wouldn't require an admin to make changes like a picklist. The downside to this method is that each branch record counts against your data storage.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.