cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dorinda
Super User
Super User

Filter Lookup

I have this formula and it works great except I need to to filter for the year 2022

If(IsEmpty(ComboBox2.Selected.Title), 
    Blank(), 
    LookUp(ChairSurvey_1, 'Meeting Group'= ComboBox2.Selected.MeetingName , ChairPerson.DisplayName )
)

 I tried to add && 'Service Year'=2022 but that didnt work and I am not sure how to get this to work.

1 ACCEPTED SOLUTION

Accepted Solutions

I did it a different way and it is working now.

 

I changed the lookup list it was easier

If(IsEmpty(ComboBox2.Selected.Title), 
    Blank(), 
    LookUp(SafetyMeetingGroups_1, MeetingName = ComboBox2.Selected.MeetingName, Chairperson.DisplayName) 
)

View solution in original post

11 REPLIES 11
fatjosh35
Helper I
Helper I

Did you try adding ".Value" after service year:

 

&& 'Service Year'.Value = 2022

 

What data type is the Service Year field?

Yes and it gave me "False" as the return value not a name I was expecting.

Is service year a date field? a text field? or a number field?

Text

Try wrapping 2022 in double quotes then. 

 

&& 'Service Year' = "2022"

 

Otherwise it would give you that false value since it's trying to compare a string (or text) to a number, which doesnt work.

Yeah tried that and still got the false

If(IsEmpty(ComboBox2.Selected.Title), 
    Blank(), 
    LookUp(ChairSurvey_1, 'Meeting Group'= ComboBox2.Selected.MeetingName , ChairPerson.DisplayName && 'Service Year' = "2022"
))

Try moving it into the second parameter of the LookUp() function. That's where the filter logic goes.

If(IsEmpty(ComboBox2.Selected.Title), 
    Blank(), 
    LookUp(ChairSurvey_1, 'Meeting Group'= ComboBox2.Selected.MeetingName && 'Service Year' = "2022", ChairPerson.DisplayName
))

Now I just get a "Blank" as the response.

Is ComboBox2 empty?

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,692)