cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dorinda
Impactful Individual
Impactful Individual

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
Dorinda
Impactful Individual
Impactful Individual

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?

Dorinda
Impactful Individual
Impactful Individual

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?

Dorinda
Impactful Individual
Impactful Individual

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.

Dorinda
Impactful Individual
Impactful Individual

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
))
Dorinda
Impactful Individual
Impactful Individual

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

Is ComboBox2 empty?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,278)