Home > CMS- Content Management System > Sharepoint > Sort the PowerApps Data/Collection by Specific Column On Click

Sort the PowerApps Data/Collection by Specific Column On Click

In PowerApps, we can use the SortByColumn functions to sort the Items/Table by specific column.

We will run how to sort the table by specific column On button click.

  1. I have a sample Product SampleData excel sheet with below columns, which is hosted on OneDrive business.
  2. I have already created a basic PowerApp with Products Sample Data
  3. Add the  Sort icon from Icons  on the header, where I added the UpdateContext formula against the onSelect property, which create a context variable for current screen.

     

  4. Added the Products item in Gallery view, where I added the SortByColumns formula against the Items property and Sorting by “Item” column. We can sort items with multiple columns like

    ClearCollect( SortByQuantity, SortByColumns( Table1, “Item”, Ascending, “Total”, Descending ) )

  5. Now run the App, you will in Ascending order (SortOrder.Ascending is the default), now Click on the Sort Icon it will sort item by Decreasing order. See below screenshot

 

I hope this helpscand you understood how to use SortByColumn in Microsoft PowerApps and how to run it.

 

This Article is TAGGED in , , , . BOOKMARK THE permalink.

Avatar photo
Chintan Upadhayay
I am a senior web developer with more than 4+ years experience in WordPress, PHP, MySQL, HTML, CSS, jQuery and other web technologies. I am the beginner in SharePoint and Learning SharePoint.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">