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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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