cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Collector
Kudo Collector

Gallery Lookup to Collection

Hi All - 

 

I am having an issue where my Lookup into a collection is not working.

 

In a gallery, I have one field which is looking up into a Collection and trying to pull in a field from the collection, using the code below:

 

LookUp(PlannerCollection, ThisItem.StaplePlannerID = Label22_25.Text, 'Planner Name')

 

My issue is that the record of 'Planner Name' continues to be duplicated in the gallery and does not appear to be working.

 

Any help? 🙂

 

In the attached image, I am trying to look up the # in the far right column of the gallery and return the name of the user associated with that number from my collection which consists of Name and #.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Impactful Individual
Impactful Individual

Re: Gallery Lookup to Collection

What is your gallery items property set to?
I would also use first(filter) as i see bigger performance improvements with this:

First(filter(othercollection,field = thisitem.field)).Fieldfromothercollection

View solution in original post

9 REPLIES 9
Highlighted
Super User
Super User

Re: Gallery Lookup to Collection

Label22_25.Text is the label in your gallery?

 

If so that is called the same thing in every line of your gallery so you will need to change that to ThisItem.FieldName and the other side actually doesn't need ThisItem...it can just be the field name from your collection. Basically the ThisItem portion need to be referring to the data source of the gallery you are in.

Highlighted
Kudo Collector
Kudo Collector

Re: Gallery Lookup to Collection

 

Thanks for the quick reply! 

 

I changed my formula to this: LookUp(PlannerCollection, 'Planner ID' = ThisItem.StaplePlannerID, 'Planner Name')

 

but now there are no results in the gallery. Thoughts?

Highlighted
Super User
Super User

Re: Gallery Lookup to Collection

Hmmm.....Isn't this just a label in your Gallery? That shouldn't change what shows in your Gallery at all. 

 

Is this LookUp on a label or did I miss something?

Highlighted
Kudo Collector
Kudo Collector

Re: Gallery Lookup to Collection

Yes, I am  looking up the value from a label in the gallery to find a value from a collection and bring that back to another label in my gallery. Sorry if that was confusing but did that help explain?

 

 

Highlighted
Impactful Individual
Impactful Individual

Re: Gallery Lookup to Collection

What is your gallery items property set to?
I would also use first(filter) as i see bigger performance improvements with this:

First(filter(othercollection,field = thisitem.field)).Fieldfromothercollection

View solution in original post

Highlighted
Kudo Collector
Kudo Collector

Re: Gallery Lookup to Collection

Hi - my gallery is set to the full range of items in my SQL table (I have not set a filter to it yet since I am just in test mode now with very few records). 

Highlighted
Kudo Collector
Kudo Collector

Re: Gallery Lookup to Collection

I tried this: First(Filter(PlannerCollection, 'Planner ID'= ThisItem.StaplePlannerID)).'Planner Name' but I still do not get any results.

 

Thoughts?

Highlighted
Impactful Individual
Impactful Individual

Re: Gallery Lookup to Collection

The labels are both in the gallery?
The data definitely is linked that way?
You have checked there is data in both collections?
The gallery items property is set to what??
Highlighted
Kudo Collector
Kudo Collector

Re: Gallery Lookup to Collection

I just double checked my collection and now it works! Thank you to all in the community for the help!

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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