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 / How to search effectiv...
Power Apps
Answered

How to search effectively with lookups to referenced entities.

(0) ShareShare
ReportReport
Posted on by 16
I'm trying to get a search done in power apps that would also include results from referenced lookup tables.

Unfortunately I'm not able to figure out a solution that works to my expectations.

Searching from "TextInput_ProjectFilter.Text", within the DB Opportunities, for the Columns "_ownerid_value" and "_od4u_endcustomer_value" returns the GUIDs and I need to do a lookup to another entity to receive User readable text values.

Original Query that runs if a Filter is applied:

If(Not(TextInput_ProjectFilter.Text = ""),Search(Opportunities,TextInput_ProjectFilter.Text,"_ownerid_value","_od4u_endcustomer_value","od4u_location","new_opportunityid","od4u_endcustomercountry","od4u_projecttitle","name"))

On the web, I found a solution that uses the AddColumns Function. This approach works but is very slow and it takes about 3 Minutes to receive the results:

If(Not(TextInput_ProjectFilter.Text = ""),Search(AddColumns(Opportunities,"lookup_endcustomer_value",LookUp(Accounts, accountid = _od4u_endcustomer_value),"lookup_ownerid_value",LookUp(Users, systemuserid = _ownerid_value),"add_od4u_location",od4u_location,"add_new_opportunityid",new_opportunityid,"add_od4u_endcustomercountry",od4u_endcustomercountry,"add_name",name),TextInput_ProjectFilter.Text,"_od4u_endcustomer_value","_ownerid_value","add_od4u_location","add_new_opportunityid","add_name"))

Would anyone have a hint how to make a better - e.g. faster approach for the search?
Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi Strahlemann,

     

    How many data are there in your data source?


    You could consider to combine Filter function within in your code, filter the data you need first then search from the filtered data, I assume that it will return results more efficiently.


    Hope this documentation could be a reference for you:
    https://powerapps.microsoft.com/en-us/tutorials/delegation-overview/

     

    Please try it on your side to see if it will work for you.

     

    Best regards,
    Mabel Mao

  • Verified answer
    Meneghino Profile Picture
    6,949 on at

    Hi @Strahlemann

    Please see here if this helps:

    https://baizini-it.com/blog/index.php/2017/08/29/powerapps-improving-lookup-performance/

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard