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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / COmbining sort with fi...
Power Apps
Unanswered

COmbining sort with filter with Document Library as source

(0) ShareShare
ReportReport
Posted on by 137

I have built an app to e-mail project specific documents to the user.

I can outline the app quick:

 

The welcoming screen has a gallery (BrowseGallery1) that shows a list of projects (source is a SharePoint list with project name, and number)

 

When you select the project you want, you navigate to the next screen which has a new gallery (Gallery1). The gallery in this screen uses a document library (ProjForPADocs) as the source.

You then get a list of all of the files that have the same project number (they are .pdf files).

 

gall.png

Untitled.png

 

To get the items in the gallery to display the name of the files, I have added a title (Title3), where the Text = ThisItem.’File name with extension’

title.png

 

The gallery then lists every .pdf connected to that project.

 

My problem is, I can not figure out how to get the gallery to sort alphabetically. Right now it just lists up the .pdf’s in any random order.

I have tried sorting like I do when I have pure SharePoint lists, but that doesn’t work with items in a gallery.

 

Any tips? I think I have to combine the sort code to include both the source (ProjForPADocs), and the title (Title3) somehow.

 

Thanks in advance.

Categories:
I have the same question (0)
  • Verified answer
    SkiDK Profile Picture
    1,016 on at

    Hi @EriSto 

    Can't you do it like this in the gallery items property:

    Sort(ProjForPADocs, 'File name with extension', Ascending)

    Could you show what line of code you used for sorting? It might help tracking down why it doesn't work.

  • EriSto Profile Picture
    137 on at

    @SkiDK thanks for the response, I need to facepalm rihgt now..... 😄

    I was using:

    Sort(Filter(ProjForPADocs, ItemID=Text(BrowseGallery1.Selected.ProjNr), 'File name with extension', Ascending)

    instead of:

    Sort(Filter(ProjForPADocs, ItemID=Text(BrowseGallery1.Selected.ProjNr)), 'File name with extension', Ascending)

  • appdevelopermcs Profile Picture
    6 on at

    wait what

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard