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
Community Champion
Community Champion

@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.

View solution in original post

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.
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
Solution Sage
Solution Sage

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
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,602)