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

ThisItem.Result Additional Fields

Hello,

I am filtering a gallery using a distinct function from a drop down. All of the gallery items currently only have one label, ThisItem.Result. Is there a way I can pull additional column data from the dataset and store it in the same gallery? 

1 ACCEPTED SOLUTION

Accepted Solutions

@mglemser 

 

Could you check if the below similar discussion and solution from @RandyHayes might help you with this one?

Multiple columns in gallery - Distinct filter

 

Check if it helps.

View solution in original post

6 REPLIES 6
poweractivate
Super User
Super User

@mglemser 

Just create another Label inside the Gallery (which after creation should show up on all rows of Gallery). 

For the Text property of this new label, use ThisItem.YourColumnNameHere

 

Repeat the above for any other additional labels and data points you want.

 

If unsure how to create a new label inside a gallery, first try to select the existing one, CTRL+C then CTRL+V and modify the copied label, if it's easier to try that way at first.

 

Check if above helps @mglemser 

mglemser
Helper I
Helper I

Thanks for the quick response. I tried that but it doesn't work when you are creating the gallery based off a distinct filter. In the screenshot below, column 1 item was thisitem.result. Column 2 was thisitem.'column name' with the following error. 

mglemser_0-1638397714278.png

 

Error:

mglemser_1-1638397802112.png

 

 

@mglemser 

 

Could you check if the below similar discussion and solution from @RandyHayes might help you with this one?

Multiple columns in gallery - Distinct filter

 

Check if it helps.

RandyHayes
Super User
Super User

@mglemser 

Yes, Distinct will return a table with a single column called Result.  So there are no other columns to use but that.

 

The typical scenario I mention for this is - what is it that you would show if you are getting a distinct list??

For example, if you had a list of names with departments and you wanted to have a distinct list of departments and then show the persons name...who would you show?  If there were 10 people with a distinct department, which one would you show?

So just keep that in mind with dealing with Distinct and then wanting to show more data.  This is why Distinct only has a single column table of results.

_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
cwebb365
Super User
Super User

Confused a bit, is your dropdown outside the gallery? Or do you mean the gallery itself has distinct on it in the items property? Either way when using distinct you're going to run into delegation issues, are these datasources going to be under the 2000 item limit when in use? Also what's the datasource? 

Thank you! The GroupBy function worked

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,272)