Notifications
Announcements
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.
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.
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 ServiceCurrently list looks like -Title Department1111 1111 | Business Service1213 1213 | Maintenance2654 2654 | Transportation3265 3265 | Supply
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.
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.
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.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 796 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
Power Platform 1919 268