cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

UpdateContext sorting not working

Hi,


I decided to rewrite the Sorting function as I wanted another Screen to also have the sort function but I am having trouble getting it to work. I am still new to PowerApps and dont understand what isnt work. It is mostly likely because it is a copy of the code the PowerApps produce when you make an app with your data. The code that I added into the Gallery is working fine. (The code I got for it in the picture below.)Gallery1 Code.PNG

But the error I am getting is coming from the UpdateContext. (The code I got for it in the picture below.)

SortUpDown Code.PNG

I did try reading the Microsoft Documents about the sorting function but it didnt really make sense. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: UpdateContext sorting not working

Hi @AliciaMunt 

I think this is just a typing mistake in your formula. Notice how the 'd' is missing in the highlighted part of your formula.

image.png

If you correct the error like so, the error should go away.

UpdateContext({SortDescending1:!SortDescending1})

View solution in original post

5 REPLIES 5
Super User
Super User

Re: UpdateContext sorting not working

Hi @AliciaMunt 

What exactly is the error message that you get with UpdateContext?

Highlighted
New Member

Re: UpdateContext sorting not working

Sorry! I didnt even think of sending that, here is the error message I am getting. Error Message for Code.PNG

Highlighted
Super User
Super User

Re: UpdateContext sorting not working

Hi @AliciaMunt 

I think this is just a typing mistake in your formula. Notice how the 'd' is missing in the highlighted part of your formula.

image.png

If you correct the error like so, the error should go away.

UpdateContext({SortDescending1:!SortDescending1})

View solution in original post

Highlighted
New Member

Re: UpdateContext sorting not working

I knew it was going to be as simple as that! Thank you.

Highlighted
Super User
Super User

Re: UpdateContext sorting not working

You're welcome, glad that helps!

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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