cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dobroo
Resolver I
Resolver I

Search Function in Column with lookup-value

Can the search()-function search in a column which has table value?

In my Example colTest:

NameAdresslookup
Name 1Adress 1Id= 1; Value="Value1"
Name 2Adress 2Id= 1; Value="Value2"
......Id=... ; Value="..." 

 

 

search(colTest;Textinput.Text;"Name";"Adress";"lookup.value")

 

This function doesn't work because the column "lookup.value" is not correct. But how can I search in the column "lookup" for the column value??

7 REPLIES 7
eka24
Super User
Super User

Try

Search(colTest,TestInput2.Text in "Name","Address","Lookup column.Value")

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Drrickryp
Super User
Super User

Hi @dobroo 

Add a column to your collection before you search it. 

 

 

 

ClearCollect(colTest;AddColumns(Test;"LUp";lookup.Value)
Search(colTest;Textinput.Text;"Name";"Adress";"LUp")

 

 

 

The in operator doesn´t work. And the column with "." doesn't work either

This works. Is that the best way for the search()-function?

The dataset is big and this slowed down the App.

Hi @dobroo 

I can't tell which type of datasource you are using to create your collection.  I don't use lookup columns and prefer to use a separate table and save the ID from that table as a foreign key.  This will execute much faster as the keys are indexed.

Hi @Drrickryp 

 

you are right. My datasource is a SPLIst.

I will think about your suggestion.

alrez
Community Support
Community Support

Hi,

 

It looks like you got most of your question answered. I just wanted to pop in and add a bit more information. Feel free to take a look.

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

 

Regards,

 

Alex

 

-------

 

Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,731)