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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter gallery using l...
Power Apps
Answered

Filter gallery using lookup field

(0) ShareShare
ReportReport
Posted on by 97

I've seen several articles regarding this and am not able to come up with a solution.

 

I have a gallery where I want to filter on a lookup field:

 

Filter(Projects,Or(IsBlank(SearchProjectInput.Text),SearchProjectInput.Text = ProjectType_New))

 

= is an invalid operator for this formula so I tried:

 

Filter(Projects,Or(IsBlank(SearchProjectInput.Text),SearchProjectInput.Text in (ProjectType_New)))

 

This results in an actual error (not a warning) that the "local evaluation would produce sub-optimal results" and the filter function fails.

 

Please help and thanks!

Categories:
  • Brian Dang Profile Picture
    3,976 on at
    Filter(Projects,
     Or(
     IsBlank(SearchProjectInput.Text),
     SearchProjectInput.Text = ProjectType_New
     )
    )

    If SearchProjectInput.Text isn't able to use the = operator with ProjectType_New, then it is likely that the data types are not the same. I'd check to be sure both are Text--maybe one of them is an entire record or something.

     

    The "local evaluation would produce sub-optimal results" message or "blue dot" means that PA will try the formula, but it won't return more than 500 records because it is too complicated for it to be delegated by the datasource itself.

  • Verified answer
    Brian Dang Profile Picture
    3,976 on at

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard