cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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
RandyHayes
Super User III
Super User III

@Anonymous 

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 below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

3 REPLIES 3
Pstork1
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.
RandyHayes
Super User III
Super User III

@Anonymous 

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 below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

Anonymous
Not applicable

Thanks @RandyHayes !

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (39,757)