web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / If Statement Referenci...
Power Automate
Unanswered

If Statement Referencing Item in Sharepoint List

(0) ShareShare
ReportReport
Posted on by 18

Hello,

Thank you in advance for the help. I need to write an If statement that will be placed into a Send an Email V2 "To" box. I have a Sharepoint List that needs to be referenced to determine what to do. Below is a sentence about what I need it to essentially do in non-code form: 

 

"If N1 is listed in the Role Type column on the Sharepoint list, then send an email to jon1@jon.com. If N2 is listed in the Role Type column on the Sharepoint list, then send an email to jon2@jon.com & jon3@jon.com."

 

Can someone help me out? 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,480 Most Valuable Professional on at

    Hi @Perrault,

     

    What type of columns is the Role Type? And does it only have N1 or N2 as values, or are there more possibilities (can it be empty for example)?

  • Perrault Profile Picture
    18 on at

    Hey! It is a single line of text and will always have something in it. It will never be blank. 

  • Perrault Profile Picture
    18 on at

    I guess to fully answer your question, it will never be blank, but it could have a variety of other options. So basically if N1 is selected, use this email address. If anything else is selected, use these email addresses. 

  • Expiscornovus Profile Picture
    33,480 Most Valuable Professional on at

    Hi @Perrault,


    In that case you could use two equals and if functions and check for N1 and N2. If it isn't one of those two values you could use a catch-all e-mail address.


    Below is an example.

    This example assumes you are retrieving the value via a Get Item action.

    if(equals(outputs('Get_item')?['body/RoleType'], 'N1'), 'jon1@jon.com', if(equals(outputs('Get_item')?['body/RoleType'], 'N2'),'jon2@jon.com;jon3@jon.com', 'allotheroptions@jon.com'))

     

     

    senanemail_roletype.png

  • Perrault Profile Picture
    18 on at

    Thank you! Are you able to show what your Get Item looks like? The expression itself is working, but it keeps just going to the catch all email address saying it does not match, even when it does. Thanks!

  • Expiscornovus Profile Picture
    33,480 Most Valuable Professional on at

    Hi @Perrault,

     

    That action is retrieving one item for testing purposes. I also used a manually trigger to run it. In my case I only used the first item of my test list with ID 1, which has the N2 value in the Role Type field.

     

    So, that is probably something which will be different in your setup. What trigger action are you planning on using?

     

    retrieveoneitem.png

     

    getitem_id1.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 173 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 95 Super User 2026 Season 1

Last 30 days Overall leaderboard