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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Compare List Column Co...
Power Apps
Answered

Compare List Column Content to User Active Directory Department

(0) ShareShare
ReportReport
Posted on by 5,331 Moderator

I have an 'Employe Department List', with department name (Name column) and number (Title column).

I am querying the Active Directory for the employee's department w/number and placing it in Label1.
     Example: 1111 - Business Relations.

I need to write an if statement in front of a SendEmail command that says if the 'number' (not department name, only the number) in Label1 matches any of the numbers in 'Employee Department List (Title column) send email. 

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,654 Super User 2026 Season 1 on at

    Hi @Phineas ,

     

    With this formula you should get the desired result:

    If(
     !IsBlank(
     LookUp(
     'Employee Department List',
     Title = Label1.Text
     )
     ),
     //Send Mail
    
    )

     

    Below the Send Mail comment you need to insert the formula to send a mail.

  • Verified answer
    Phineas Profile Picture
    5,331 Moderator on at

    Getting close.

    This is what I did as test, first -

    I placed your formula in Label1. I had to change the equal to an 'in' as the content of EmployeeList,Title and DataCardValue.Text doesn't MATCH.
         If(!IsBlank(LookUp(EmployeeList,Title in DataCardValue.Text)),"Yes","No")

    The list has a Dept No. (Title) column and a Department (description) column.

    I can't use the 'equal' but the 'in' works, even though it's kicking back a delegation warning.

    Currently DataCardValue looks like - 1111 - Business Service

    Currently list looks like -
    Title              Department
    1111            1111 | Business Service
    1213            1213 | Maintenance
    2654            2654 | Transportation
    3265            3265 | Supply

  • BCBuizer Profile Picture
    22,654 Super User 2026 Season 1 on at

    Hi @Phineas ,

     

    The delegable alternative may then be:

     

    If(
     !IsBlank(
     LookUp(
     'Employee Department List',
     Department = DataCardValue.Text
     )
     ),
     "Yes",
     "No"
    )

     

    However, this will only work if DataCardValue will contain values that match the Description column.

  • Phineas Profile Picture
    5,331 Moderator on at

    Now, how about if it DOESN'T match, or is not IN?

    How do I edit If(!IsBlank(LookUp('List',Title in DataCardValue..Text))

    I need one for 'IN' (to go to one recipient) and one of 'NOT IN' to go to another recipient.

  • Phineas Profile Picture
    5,331 Moderator on at

    I can't guarantee the department description will away match. There are only 600 or so items on the list, so delegation should be an issue, actually.

  • Verified answer
    BCBuizer Profile Picture
    22,654 Super User 2026 Season 1 on at

    Hi @Phineas ,

     

    Your project, your choice 🙂

     

    To send an email in case of NOT IN, you can just use de If_False statement (in your formula "No").

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard