cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KIBANG
Helper II
Helper II

How to avoid the "apply to each" nesting in sharepoint list with multiple selections enabled in certain columns

I have created a meeting request form, and I have created a flow where I put the meeting details into an email to the meeting organizer, along with a link to modify the meeting. I am able to add in values of every column (Title, location, meeting type, etc.) with no issue. The problem I am encountering is when I try to add in the meeting needs and presentation needs values into the body of the email. These two columns are multiple selections enabled, and when I try to add them into the body of the email, an "apply to each" nesting occurs when I try adding meeting needs value, then it nests again (apply to each 2) when I try to add the presentation needs value under it. If the user selects two items from each column ( breakout rooms, polls) and (PowerPoint, Streaming), it generates four emails to the user, with each variation of selected items from needs. I only want one email with all the meeting details. If there is a better way to accomplish this, I am very open to trying that. Please help!!! Screenshots attached for reference. First without the meeting needs, and then after I try to add them. 

 

email notification without needs.pngemail notification with needs.png

1 ACCEPTED SOLUTION

Accepted Solutions
Mira_Ghaly
Dual Super User II
Dual Super User II

@KIBANG 

On this step you need to select Mapping Needs Value, i can't actually see if you are already selecting it or no

Mira_Ghaly_0-1617142745988.png

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

6 REPLIES 6
Mira_Ghaly
Dual Super User II
Dual Super User II

@KIBANG 

You need to collect the Presenters or any other file with multiple items in a variable using concatenate and move the email step outside and use the generated variable or compose action instead.

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
KIBANG
Helper II
Helper II

Hi Mira,

 

thank you so much for the reply. I am a relative newbie, so I am not quite sure what you mean. If you could elaborate on these functions with more of a step by step, that would be greatly appreciated. 

ki

Mira_Ghaly
Dual Super User II
Dual Super User II

@KIBANG 

 

You need to do the below for any multi choice column

triggerOutputs()?['body/Presenter_x0028_s_x0029_']

Expression for Multivalued Field for my example which a field called presenters'

 In Bold is the field name in sharepoint

First Step is to Select Value from The Multi Choice Field into array then perform a join operation with whatever field you 

 

Mira_Ghaly_0-1617075857129.png

You can then use the output of the Join Step in your email sending step.

 

Hope this explains it a little bit more!

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Hi Mira,

 

When I add the steps as suggested, I am getting the following output:

 

Hi Ki Bang,

Your meeting Request has beeen received with the details below:

TEST 1 3-30
Virtual

3/30/2021 9:25 AM
3/30/2021 9:30 AM
Zoom Meeting

[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":0,"Value":"Recorded"},{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":1,"Value":"Breakout rooms"}]:[{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":0,"Value":"Recorded"},{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":1,"Value":"Breakout rooms"}]
I have included the flow screenshots for reference. I am definitely missing something, just not sure what it is.

email notification with select and join 2.pngemail notification with select and join 3.png

Mira_Ghaly
Dual Super User II
Dual Super User II

@KIBANG 

On this step you need to select Mapping Needs Value, i can't actually see if you are already selecting it or no

Mira_Ghaly_0-1617142745988.png

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
KIBANG
Helper II
Helper II

Mira,

 

That did the trick. Thank you so much for all your help!

 

Ki  

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,104)