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 / Sort an Filter Datasou...
Power Apps
Answered

Sort an Filter Datasource Sharepoint

(0) ShareShare
ReportReport
Posted on by 4

Hi,

 

I need your help,

 

I've got a Sharepoint List with Date-Field, Text-Fields

 

  • Member (Text = Title)
  • Contact-Name (Text = Subtitle)
  • Phone (Text)
  • Email (Text)
  • Start (Date and Time =Body)
  • End (Text)

I want to sort this by date in my Powerapp. I start with a Gallery. The search options should be Member or Contact-Name oder Start.

 

 

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @msbrh 

    To sort a Sharepoint List you would use this code in the Items property of your Gallery.  I assume you want to sort Start by oldeset to newest and the column is type date.

     

    Sort(your_datasource_name,Start,Ascending);

    ---
    Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

  • RezaDorrani Profile Picture
    12,145 on at

    Hi @msbrh 

     

    For Items property of gallery

     

    Sort(Search(datasource,"search text", "Member","Contact-Name"),Start, Descending)

    OR

     

    Sort(Search(datasource,"search text", "Member","Contact-Name"),Start, Ascending)

     

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

  • msbrh Profile Picture
    4 on at

    @mdevaney wrote:

     

     

    Sort(your_datasource_name,Start,Ascending);

    Thanks, but this works only for the gallery, searchbox dosn't


     

  • msbrh Profile Picture
    4 on at

    @RezaDorrani wrote:

     

     

    Sort(Search(datasource,"search text", "Member","Contact-Name"),Start, Descending)

    OR

     

    Sort(Search(datasource,"search text", "Member","Contact-Name"),Start, Ascending)

     

    Thanks but this dosn't work. I need a hint for "search text". I'm using a TextSearchBox.

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

    Hi @msbrh ,

    You could try this formula:

    Sort(Search(datasource,TextSearchBox.Text, "Member","Contact-Name"),Start, Descending)
    
    OR
    
     
    
    Sort(Search(datasource,TextSearchBox.Text, "Member","Contact-Name"),Start, Ascending)

    I suggest you know more about Search function, here's a doc about it for your reference:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

     

     

    Best regards,

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard