cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KatieF
Level: Powered On

GroupBy- Can't show different column Items in Gallery SubTitle

Hello,

 

Very new to PowerApps so please excuse me if my language isn't correct. I'm struggling at the moment because I need to display the Item "Title" AND the Item "Syle Code" in my gallery list. The Item of clothing has multiple colours per style, so for this screen I've grouped all of my styles, ready for the next screen to display all of that style's colour options. It's just I can't seem to show the corresponding style code as a subtitle.

 

I've attached images of my GroupBy formula on the powerapps screen, and then my sharepoint list where all of the information is stored.

 

Screen Shot 2017-11-14 at 10.41.00.pngScreen Shot 2017-11-14 at 10.43.35.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps Staff CarlosFigueira
Power Apps Staff

Re: GroupBy- Can't show different column Items in Gallery SubTitle

Currently you're grouping the products by title only, but there are multiple styles for each title. For example, for the 'Amara Dress' there are styles SL17DRS1 and SLDRS1. If you want to group by those two columns (title / style), then you can specify both in the GroupBy expression:

GroupBy(Products, "Title", "Style", "Group")

And the result of this expression will contain a column for both title (item name) and style, with an additional column called "Group" that contains all the records that match the title/style pair. With that you should be able to have the subtitle showing the style as well.

View solution in original post

4 REPLIES 4
Highlighted
Power Apps Staff CarlosFigueira
Power Apps Staff

Re: GroupBy- Can't show different column Items in Gallery SubTitle

Currently you're grouping the products by title only, but there are multiple styles for each title. For example, for the 'Amara Dress' there are styles SL17DRS1 and SLDRS1. If you want to group by those two columns (title / style), then you can specify both in the GroupBy expression:

GroupBy(Products, "Title", "Style", "Group")

And the result of this expression will contain a column for both title (item name) and style, with an additional column called "Group" that contains all the records that match the title/style pair. With that you should be able to have the subtitle showing the style as well.

View solution in original post

KatieF
Level: Powered On

Re: GroupBy- Can't show different column Items in Gallery SubTitle

Perfect!! So Simple - I didn't understand it on the the Microsoft Documentation before you showed me like this! (https://docs.microsoft.com/en-us/powerapps/functions/function-groupby) 

KatieF
Level: Powered On

Re: GroupBy- Can't show different column Items in Gallery SubTitle

If I could take this one step further, is there a way to show just one picture per Item? It doesn't matter which picture, because I have variations on colour, just want one per style as a reference. Before I have tried to create Cascading Gallerys through multiple sharepoint lists with Lookups, but lookup values don't appear as text values so the cascading galleries was too difficult to formulate. 

Power Apps Staff CarlosFigueira
Power Apps Staff

Re: GroupBy- Can't show different column Items in Gallery SubTitle

If you want any picture for each group, you can use the First element of the group and retrieve the picture from it. Something along the lines of

First(ThisItem.Group).'Picture front'

The ThisItem operator returns the current record that is being displayed in the gallery; the Group column contains all the records from the group, so taking the first one will give you one of them, after which you can retrieve the picture to display in the gallery row.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,218)