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

Notifications

Announcements

Community site session details

Community site session details

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

Compare List Column Content to User Active Directory Department

(0) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2

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,505 Super User 2025 Season 2 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,325 Super User 2025 Season 2 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,505 Super User 2025 Season 2 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,325 Super User 2025 Season 2 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,325 Super User 2025 Season 2 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,505 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard