cancel
Showing results for
Did you mean:
Kudo Kingpin

## If Statement with Lookup

Hello Community.

I am having hard time trying to figure this formula. I hope someone could point me in the right direction:

I need to return a true or false value if the condition is meet for instance

I have a Share point list where an employees could be in the year 2015, and 2020

I need to check if the employee selected in my combobox is present in that Share point list. In this case yes. in the years 2015 and 2020

And also, if the condition is true I need to see if the penalty is applicable to the current year

i.e:

Emp Number   |   Employee Name    |  Usage     |     Penalty   |  Eligible On

12345              |    Jhon Smith           |   2015       |          2        |   2017

.

.

.

12345              |    Jhon Smith           |   2020       |          2        |   2022

.

.

.

12345              |    Jhon Smith           |   2023       |          2        |   2025

So, Current Year 2023 Eligible on 2025 , Condition No meet

I hope this make sense. Sorry

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

Hi @sajarac ,

Slightly different approach here:

``````With(
{_Employee: Filter(Employees,
'Employee Name' = ComboBox.Selected.Name)},
!IsBlank(LookUp(_Employee, Usage = 2015)) &&
!IsBlank(LookUp(_Employee, Usage = 2022)) &&
!IsBlank(LookUp(_Employee, 'Eligible On' = Year(Now())))
)	``````

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.
2 REPLIES 2
Resolver II

give this a try:
[your employee].email in Filter([your employee SP list], (usage = "2015" || usage = "2020")).email

will return a true or false

Super User

Hi @sajarac ,

Slightly different approach here:

``````With(
{_Employee: Filter(Employees,
'Employee Name' = ComboBox.Selected.Name)},
!IsBlank(LookUp(_Employee, Usage = 2015)) &&
!IsBlank(LookUp(_Employee, Usage = 2022)) &&
!IsBlank(LookUp(_Employee, 'Eligible On' = Year(Now())))
)	``````

Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Announcements

#### Power Platform Connections Ep 15 | L. Baybutt | Thursday, 1 June 2023

Episode Fifteen of Power Platform Connections sees David Warner and Hugo Bernier talk to Microsoft MVP Lewis Baybutt aka Low Code Lewis, alongside the latest news and community blogs.   Use the hashtag #PowerPlatformConnects on social media for a chance to have your work featured on the show.      Action requested: Feel free to provide feedback on how we can make our community more inclusive and diverse.  This episode premiers live on our YouTube at 12pm PST on Thursday 1st June 2023.  Video series available at Power Platform Community YouTube channel.    Upcoming events:  European Power Platform conference – Jun. 20-22nd - Dublin Microsoft Power Platform Conference – Oct. 3-5th - Las Vegas  Join our Communities:  Power Apps Community Power Automate Community Power Virtual Agents Community Power Pages Community  If you’d like to hear from a specific community member in an upcoming recording and/or have specific questions for the Power Platform Connections team, please let us know. We will do our best to address all your requests or questions.

#### Microsoft Power Platform Conference | Registration Open | Oct. 3-5 2023

We are so excited to see you for the Microsoft Power Platform Conference in Las Vegas October 3-5 2023! But first, let's take a look back at some fun moments and the best community in tech from MPPC 2022 in Orlando, Florida.   Featuring guest speakers such as Charles Lamanna, Heather Cook, Julie Strauss, Nirav Shah, Ryan Cunningham, Sangya Singh, Stephen Siciliano, Hugo Bernier and many more.   Register today: https://www.powerplatformconf.com/

#### Check out the new Power Platform Communities Front Door Experience!

We are excited to share the ‘Power Platform Communities Front Door’ experience with you!   Front Door brings together content from all the Power Platform communities into a single place for our community members, customers and low-code, no-code enthusiasts to learn, share and engage with peers, advocates, community program managers and our product team members. There are a host of features and new capabilities now available on Power Platform Communities Front Door to make content more discoverable for all power product community users which includes ForumsUser GroupsEventsCommunity highlightsCommunity by numbersLinks to all communities Users can see top discussions from across all the Power Platform communities and easily navigate to the latest or trending posts for further interaction. Additionally, they can filter to individual products as well.       Users can filter and browse the user group events from all power platform products with feature parity to existing community user group experience and added filtering capabilities.     Users can now explore user groups on the Power Platform Front Door landing page with capability to view all products in Power Platform.    Explore Power Platform Communities Front Door today. Visit Power Platform Community Front door to easily navigate to the different product communities, view a roll up of user groups, events and forums.