cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kilaj1
Helper III
Helper III

Query multi choice SPO field to send email

I have a workflow that gets triggered on creation of a item on a SPO list. This list has a multi-choice field called "Required Event Support".  You ahve the option of selecting multiple entries. 

 

I need to be able to use PowerAutomate to send an email to the submitter, in a section of this email I need to add specific text based on what was selected in the "Required Event Support".  If it was say option a and option d, the email notification will be appended with special notes for options A and D.

 

I've managed to parse the data out using "Append to Array" and the "Select" functions

kilaj1_0-1653006493427.png

Choices produces 

[
  "No support required",
  "E-B",
  "Gift A",
  "Socials"
]

And the "Select" output is 

[
  {
    "Value": "No support required"
  },
  {
    "Value": "E-B"
  },
  {
    "Value": "Gift A"
  },
  {
    "Value": "Socials"
  }
]

I've tried a IF + Contains formula to trigger an initialization of the variable with the specific text

similar to this if(contains(body('Select'),'E-B'),Yes,No), but this is not returning results.

 

I need to have PowerAutomate look through the above array and see that E-B was selected and then initialize the variable 

1 REPLY 1
Expiscornovus
Dual Super User
Dual Super User

Hi @kilaj1,

 

After the Select you could use a Filter Array action and check if the outputs is empty of that filter array action. If that is the case it has not found a match.

 

Below is an example.

 

After that Filter Array you could use an expression like below to check if empty.

if(empty(body('Filter_array')), 'Yes','No')

 

filterarrayaction_checkitemvalue.PNG

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,310)