cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

UpdateContext({SortDescending1: !SortDescending1}) not working

UpdateContext({SortDescending1: !SortDescending1}) not working. I have 6k records in CDM table and its not doing sorting in powerapp.

3 REPLIES 3
Community Support Team
Community Support Team

Re: UpdateContext({SortDescending1: !SortDescending1}) not working

Hi @AmitLoh-Powerap,

 

Could you please explain a bit regarding the formula (the behovior formula you used with UpdateContext function), and the error messages?

What you would like the UpdateContext function to achieve? UpdateContext could only be used within a behavior formula.

Function Reference:

UpdateContext function in PowerApps

In addition, have you tried the Sort or Sortbycolumns function in PowerApps?

Sort and SortBycolumns functions in PowerApps

Regards

 

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

Re: UpdateContext({SortDescending1: !SortDescending1}) not working

thanks! I will try Sort and SortBycolumns functions in PowerApps  and will let you know. The out of box app gave me UpdateContext({SortDescending1: !SortDescending1}) but its not sorting asc/desc.

Highlighted
Anonymous
Not applicable

Re: UpdateContext({SortDescending1: !SortDescending1}) not working

You need to have sorting set up in your data source in your gallery. For example, something like:

 

SortByColumns(Search('List 1', TextSearchBox1_2.Text, "Title"), "Title", If(SortDescending1, Descending, Ascending))

 

Where 'List 1' would be your Sharepoint list (or CDS table) and "Title" would be the field on the list.

 

 

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 (6,088)