cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

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.
Highlighted
Kudo Kingpin
Kudo Kingpin

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,068)