cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kramerica
New Member

If one or more (any) item in choice field is selected

I have a form that has several multiple choice fields. Each choice field should direct an approval to a different person - such that if someone selected "option 1, 2, and 3, but not 4 or 5" from a field called "IT Access Permissions" the approval will be sent to the IT manager. Similarly with a choice field called "Finance Access Permissions" and so on. 

I want to create a condition of "if anything within this multiple-choice field is checked then perform action". How might i go about doing this? 

One condition is that my company wont let me use powerapps, this has to be completely within flow. 

Thank you.

 

Edit - Solved...

Older forum posts were using a different function formatting, so none of them worked for me. I set a condition using "empty(triggerBody()?['fieldName'])" is equal to "TRUE" and that seemed to work. Not sure why it has to be "triggerBody"...  but I'm new to this so, yeah. I found that "peeking at code" from a previous flow item revealed the parts of the formula i was looking for. 

Hope this helps someone else.

1 ACCEPTED SOLUTION

Accepted Solutions
kramerica
New Member

Edit - Solved...

Older forum posts were using a different function formatting, so none of them worked for me. I set a condition using "empty(triggerBody()?['fieldName'])" is equal to "TRUE" and that seemed to work. Not sure why it has to be "triggerBody"...  but I'm new to this so, yeah. I found that "peeking at code" from a previous flow item revealed the parts of the formula i was looking for. 

Hope this helps someone else.

View solution in original post

3 REPLIES 3
yashag2255
Dual Super User II
Dual Super User II

Hi @kramerica 

 

For checking across multiple selected operations, you could use the condition control and group the possible choices against the approval action. 

 

Another way is to initialise and create multiple arrays that would have the options for a particular approver and then get the choices selected in a new array. Add a condition action to check if the parent array contains the elements of the array created by populating teh choices from the SP list item (makes sense?) and then add the consecutive actions accordingly. 

 

If it would be single choice type, the best way to do this would be using the switch case control. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

v-yamao-msft
Community Support
Community Support

Hi @kramerica ,

 

Do you want to send out an approval email based on different choices?

 

Are you working with Microsoft Forms? Could you share more details on the form’s configuration?

 

Let’s say that you have multiple selections enabled field in the form, and you want to send an email to different people for approval based on the selections. If the selection is Test2 and Test3, send an email to user1, if the selection is Test4 and Test5, send an email to User2, otherwise send an email to User3.

 

I have set up the flow likes below for your reference, the function used in the To field is:

if(and(contains(body('Get_response_details')?['r57b450d4a73547e88415d168e951b14a'],'Test2'),contains(body('Get_response_details')?['r57b450d4a73547e88415d168e951b14a'],'Test3')),'test4@xxxxx.onmicrosoft.com',if(and(contains(body('Get_response_details')?['r57b450d4a73547e88415d168e951b14a'],'Test4'),contains(body('Get_response_details')?['r57b450d4a73547e88415d168e951b14a'],'Test5')),'mabel@xxxxx.onmicrosoft.com','test2@xxxxx.onmicrosoft.com'))

1.PNG

 

Hope it could be a reference for you.

 

Best regards,

Mabel          

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
kramerica
New Member

Edit - Solved...

Older forum posts were using a different function formatting, so none of them worked for me. I set a condition using "empty(triggerBody()?['fieldName'])" is equal to "TRUE" and that seemed to work. Not sure why it has to be "triggerBody"...  but I'm new to this so, yeah. I found that "peeking at code" from a previous flow item revealed the parts of the formula i was looking for. 

Hope this helps someone else.

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,103)