cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AmitLoh-Powerap
Kudo Kingpin
Kudo Kingpin

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
v-micsh-msft
Community Support
Community Support

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.

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.

Anonymous
Not applicable

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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,820)