cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Lookup in a galery

Hi all,

 

I've a question.

 

I've two SharePoint lists:

1) Item Request

2) Request comments

 

In both lists I've a column that match for some records (RefID)

 

In my app I've two gallery's.

Gallery2 has the Item Requests as data source.

Gallery1 has the Request Comments as data source.

 

For Gallery1 I've set a lookup formula that shows only the items that has a match with the selected RefID from Gallery2:

LookUp(RequestComments,RefID = Gallery2.Selected.RefID)

When I've multiple matches, it shows only the first record in Gallery1:

 

2020-11-20 14_43_32-Window.png

 

What are my mistakes? And how can I display all the records that has a match?

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

@DBG88 

Consider changing your formula on the Gallery1 to the following:

Filter(RequestComments,RefID = Gallery2.Selected.RefID)

 

That should give you all the matching records.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

3 REPLIES 3
Highlighted
Dual Super User III
Dual Super User III

It only shows one record because Lookup is designed to find the first record in a data source that matches the expression and return it.  It only ever returns one record.  Instead of Lookup you probably want to use Filter() to get all the records that match.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Super User III
Super User III

@DBG88 

Consider changing your formula on the Gallery1 to the following:

Filter(RequestComments,RefID = Gallery2.Selected.RefID)

 

That should give you all the matching records.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Highlighted

Thanks @RandyHayes !

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,185)