I am trying to build a flow that pulls names from a multi select from a SharePoint List that I then want to do a If Contains String Variable on that list to generate emails addresses. An example of the formula I have tried is below:
if(contains(triggerBody()?['COLUMN NAME'],'PERSON NAME'),'NAME@EMAIL.com',null)
This unfortunately only returns the null even when there is the desired name chosen in the multi select list.
Am I on the right track to pull what I am looking for?
Solved! Go to Solution.
Here is an example. I have a list with a multi-select choice column called MyChoice. I evaluate each selection in the loop by looking at MyChoice Value. The string will contain a semicolon delimited list of email addresses.
Technically, I could have eliminate the conditions and used a single expression but the expression would be a bit ugly.
A SharePoint choice column that allows for multi-select generates a collection in Flow. So, you need to loop through the responses (value) and take action as appropriate on each value. Let me know if you need a example.
Here is an example. I have a list with a multi-select choice column called MyChoice. I evaluate each selection in the loop by looking at MyChoice Value. The string will contain a semicolon delimited list of email addresses.
Technically, I could have eliminate the conditions and used a single expression but the expression would be a bit ugly.
This is actually how I had it set up to begin with. The issue I ran into with was that I have 41 different names in my multi-select.
This is also only the first part of my flow that I imagine will become quite expansive and I worry about the flow taking too long and failing
I suggest creating a second SharePoint list that contains the option values as well as the email addresses. That way, you can just lookup the email address in the reference list rather than using a condition. You'll still need to loop through each selected option per my example.
Can you please provide an example. I am using a People or Group column with multiple people selected rather than a Choice column with multiple selections.
Thank you!
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
User | Count |
---|---|
23 | |
12 | |
11 | |
10 | |
8 |
User | Count |
---|---|
33 | |
24 | |
22 | |
17 | |
16 |