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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,133)