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?
I have the same question (0)