web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery View showing G...
Power Apps
Answered

Gallery View showing Grouped Submission Statuses with Item count

(0) ShareShare
ReportReport
Posted on by 113

Hi,

 

I'm trying to create a to-do-list Gallery (from SP List) for supervisors that shows only Submission Status grouped with count of items under each status.  I'd like to be able to click the Submission Status to have it expand to show all items with that status.  

 

For Example:

  Enter Case (3)                                              >

  Review Approvals (2)                                   >
  Send Report (5)                                           >

 

Appreciate the help,

Jesse

Categories:
I have the same question (0)
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @LYNCHJL ,

     

    I have an out of box sample gallery to do this. Demo:

    GIF_58.gif

    Your requirement is actually an Expander. The Expander is made up of two Gallery, the main is Flexible Height Gallery which is the key, and use variables to control the sub-gallery visibility.
    Please find the attachment (.msapp), Open it in PowerApps studio and do some following modifications:
    1. Modify the Items property of Main Gallery:
    AddColumns(GroupBy('Your SP list',"Status Column","Grouped"),"Sum",CountRows(Grouped))
    2. Modify the Text property of Label1 in SubMenuGallery:
    ThisItem.'Your Column Name'
    3. The Sub-Gallery Height is based on the number of row in sub-gallery, if you want to add more labels in it and expand the height, just increase base value(now is 80)

    Snipaste_2020-04-20_15-48-08.png

    Hope this helps.
    Sik

     

  • LYNCHJL Profile Picture
    113 on at

    Hi @v-siky-msft , thanks this is very helpful!

     

    I got step one to work, but am unsure how to add the sub Gallery.  Also the Count number did not appear for some reason.

     

    thanks

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @LYNCHJL ,

     

    To add the sub-gallery, first to click the pencil button in the upper left corner of the main gallery, then insert the gallery.
    Please post back some screenshots to describe your issue, I can't figure out the cause of your mistake out of thin air.
    I suggest you directly copy and paste my sample gallery and do modification on the copy one.
    Sik

     

  • LYNCHJL Profile Picture
    113 on at

    Deleting this question.  

  • LYNCHJL Profile Picture
    113 on at

    @v-siky-msft, Hi.

     

    Also, in addition to the question above, I am having trouble loading the selected item from the submenugallery into a form on the same page. 

     

    On the form, I have Item set to:  SubMenuGallery.Selected

     

    What should i set OnSelect to on the SubMenuGallery?  Select(Parent) gives me an error.

     

    thanks

     

     

  • LYNCHJL Profile Picture
    113 on at

    Hi @v-siky-msft , your expander app works and looks great. 

     

    I am having trouble loading a form with the selected item from the submenugallery.  Any advice on how I can configure the form?

     

    Thank you so much!

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @LYNCHJL ,

     

    To the first question, Modify the Main-Gallery.Items property as below to add the search function.

    AddColumns(GroupBy(Search('Source', User().Email,"Office_x0020_Supervisors"),"Status Column","Grouped"),"Sum",CountRows(Grouped))

     

    To the second question, It is not supported to reference directly from sub-gallery, please try this:

    1. Set Sub-Gallery.OnSelect:

    Set(MyVar,ThisItem.ID)

    2. Modify Form.Item:

    LookUp('SP list', ID= MyVar)

     

    Hope this helps.

    Sik

  • LYNCHJL Profile Picture
    113 on at

    Hi @v-siky-msft ,

     

    Thanks for your help on this gallery.  Now that I am populating this with data, I am facing an issue -- the gallery only allows me to select the first item.  I am unable to select other items in the list.  I attempt to select an item however it does not even set MyVar to the item ID number.

     

    Any thoughts?

     

    Many thanks

  • LYNCHJL Profile Picture
    113 on at

    Hi @v-siky-msft 

     

    I have been your expander model and it great!

     

    I am running into an issue though.  Initially I was connecting to a SP List directly as a datasource, however I had to pull that data into a collection because there are more than 2000 items in the list.  I tried changing the name of the SP List data source to the name of the collection but it does not connect and pull in the data.  below is the filter I am using on the main gallery.  How should i modify it to pull the data from the Collection?  thanks!

     

    SP List Data Connection - 'Tracker'

    Collection Name: - AllActivities

     

    Original formula for Item:

    AddColumns(GroupBy((Search(Filter( 'Tracker', HR="Yes"), User().Email, "Tracker_x0020_All_x0020_Post_x00")),"To_x0020_Do_x0020_List_x0020_Sta","Grouped"),"Sum",CountRows(Grouped))

     

    Updated formula for Item with Collection as Source (not working):

    AddColumns(GroupBy((Search(Filter( 'AllActivities', HR="Yes"), User().Email, "Tracker_x0020_All_x0020_Post_x00")),"To_x0020_Do_x0020_List_x0020_Sta","Grouped"),"Sum",CountRows(Grouped))

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard