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 / Best way to display lo...
Power Apps
Answered

Best way to display long list of items

(0) ShareShare
ReportReport
Posted on by 5,836 Moderator

I am looking for suggestions.  In my app I have a nested gallery setup of distribution groups.   I have a button that is visible if the group has members.  Some are dynamic groups and do not contain other groups.   The data source is SharePoint and the group members column is multi-select.    When the button is clicked a 'popup' displays the member groups.   This is working correctly but the list can be quite long and sometimes is larger than the app.

 

I don't particularly want a gallery here with a scroll bar.  I am hoping that there is a way that I can display these member groups in a multi-column format if the count of groups exceeds a certain number.   Currently they are being displayed in a label with auto-height turned on, with this formula, which works very well.    I thought about a table, but wasn't sure how to accomplish populating the list across two cells.

 

Concat(LookUp(Ungroup(colGroups, "Details"), Title = varTitle).Members, Value, Char(13))

 

groupsdisplay.png

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at

    Hi @JR-BejeweledOne ,

     

    Try these settings for the label:

    Label.AutoHeight = false
    
    Label.Overflow = Overflow.Scroll
    
    Label.Height = With(
     {
     _Height: (CountRows(
     Split(
     Self.Text,
     Char(13)
     )
     ) * 20) + 10
     },
     If(
     _Height > 200,
     200,
     _Height
     )
    )

    Basically this acts like as if AutoHeight were turned on, but with a maximum of 200 after which a scrollbar can be used to watch the rest of the items. Of course the Label.Height property can be tweaked in many ways, but I hope you get the gist of it.

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I can use that if it comes down to it, but I am hoping to avoid the scroll bar altogether.  I would prefer to have it displayed in multiple columns or maybe two labels, but I might need to create a temporary collection to do it that way.

  • Verified answer
    JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I solved this.   The solution was to add a second label and modify the formula on the first label to limit the number of groups shown and then use the other formula to capture the remaining rows in the second label.  

     

    OnSelect of the button:

    Set(varTitle, GalleryLocatonDetails.Selected.Title); Set(varMemberCount, CountRows(LookUp(Ungroup(colGroups, "Details"), Title = varTitle).Members))

     

    First Label:

    Concat(
     FirstN(
     Sort(
     LookUp(
     Ungroup(
     colGroups, 
     "Details"
     ), 
     Title = varTitle
     ).Members, 
     Value
     ), 30
     ), 
     Value, 
     Char(13)
     
     )

     

     

    Second label:

    If(varMemberCount >30, 
     Concat(
     LastN(
     Sort(
     LookUp(
     Ungroup(
     colGroups, 
     "Details"
     ), 
     Title = varTitle
     ).Members, 
     Value
     ), varMemberCount - 30
     ), 
     Value, 
     Char(13)
     )
    )

     

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 364 Most Valuable Professional

#2
11manish Profile Picture

11manish 186

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 105 Super User 2026 Season 1

Last 30 days Overall leaderboard