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 / Display gallery item f...
Power Apps
Answered

Display gallery item for each counted instance from a SharePoint list.

(0) ShareShare
ReportReport
Posted on by 11

Hello all,

  I am working against an excel worksheet that is converted to a SharePoint List.  In the list there are duplicate names in a Column named "Source".  I have created a gallery that contains a label that gathers the duplicated named instance (e.g. Inventory).  I have been successful in gathering the total number of duplicate names by using Count Rows.  What I am attempting to do is to use the On Select property of a button to navigate to a new Horizontal Gallery that will show each named instance in the "Source" Column.  From this new gallery users can view the data from the named instance then decide whether to delete the duplicate named instance if it is not important.  I have all other formulas working properly except the On Select property of the navigation button which would show each named instance in the new horizontal gallery.  Is this possible to accomplish?  Thank you in advance.

Categories:
I have the same question (0)
  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Hi @ITPadawan 
    Can you post an example of what the data looks like in the label that contains the duplicated names, using fake/dummy data?

  • ITPadawan Profile Picture
    11 on at

    Thank you for your response.  The Data that I am using is from a sample.(Older Excel worksheet not used in production any longer).  I am using CountRows(Filter(Datasource, Source=ThisItem.Source)) to populate the label.  I wish to use the OnSelect function to populate a gallery with each individual instance based on the Count of instances.  For example. If the count of items is 5 the corresponding gallery will show all five items.

    Dupe1.PNG
  • Verified answer
    DJ_Jamba Profile Picture
    2,837 Moderator on at

    Hi @ITPadawan 
    The code in the label is not delegable (see the yellow triangle), try:

    With(
     {
     varDupes: Filter(
     Datasource,
     Source = ThisItem.Source
     )
     },
     CountRows(varDupes)
    )


    Then, when you click on a row in that gallery (let's call it Gallery1), the Items property in the second gallery should be:

    Filter(
     Datasource,
     Source = Gallery1.Selected.Source
    )​




  • ITPadawan Profile Picture
    11 on at

    Thank you! That worked perfectly. Is it also possible  in the second gallery to show each instance in as gallery item? For clarity if there are five counted instances each instance is shown as a separate gallery item.

    DupeGallery.PNG
  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Unless I'm misunderstanding you...


    Let's say the selected row in the first gallery has a source called 12345 and there are 10 duplicates of 12345 in the source table.
    The 2nd gallery should list all 10 instances of 12345 from your source table using the code I gave you:

    Filter(
     Datasource,
     Source = Gallery1.Selected.Source
    )​

     

  • ITPadawan Profile Picture
    11 on at

    My apologizes.  Yes you are correct.  I had some previous formatting that I needed to remove that seemed to cause this issue.  Thank you again for your help I appreciate you.  Take care.

  • DJ_Jamba Profile Picture
    2,837 Moderator on at

    Great! Glad it's solved!
    d(-_-)b

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard