cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
msbrh
Level: Power Up

Sort an Filter Datasource Sharepoint

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Sort an Filter Datasource Sharepoint

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,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Sort an Filter Datasource Sharepoint

@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."

Dual Super User
Dual Super User

Re: Sort an Filter Datasource Sharepoint

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
Level: Power Up

Re: Sort an Filter Datasource Sharepoint


@mdevaney wrote:

 

 

Sort(your_datasource_name,Start,Ascending);

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


 

msbrh
Level: Power Up

Re: Sort an Filter Datasource Sharepoint


@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.

Community Support Team
Community Support Team

Re: Sort an Filter Datasource Sharepoint

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,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,314)