cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MAV_CB
Microsoft
Microsoft

Updating SharePoint list sorting via list item update

Working with a SharePoint list that has a custom sorting order based on a number column. As a user, I want to be able to re-order the list items based on that Sort Order column value changing. So for example, if I have 3 rows, with a Sort Order value of 1,2 and 3 respectively, I want to update the 2nd row's Sort Order value to equal 3, and simultaneously make the 3rd row have a new sort order value of 2.

 

Clear as mud? Please let me know if anyone has tackled this kind of challenge before. I want to say the use of a ForAll function is somewhere in there but trying to work through the syntax.

 

1 ACCEPTED SOLUTION

Accepted Solutions

@MAV_CB 

Somewhat easier to demonstrate than to explain...

 

Attached is a sample app that demonstrates the reordering of a list.

It is UI based - meaning that the user initiates the action to change the order via up and down arrows.

 

Check the OnSelect actions of the up and down arrows.  There is very little there, but it does what is needed.

 

I hope this is helpful.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

7 REPLIES 7
RandyHayes
Super User
Super User

@MAV_CB 

Yes, very clear.  Question though...from a design perspective, are you planning to do this in a "arrow up" "arrow down" way, or from a arbitrary change of order?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks Randy. Arrow up/arrow down way would be great from a UI perspective, but I'll take whatever method is practical. 

 

Basically I have a list of 30+ questions broken out by Categories. So when I user is sorting the list of questions, they first would filter by Category, then re-arrange the questions in the order they want them displayed in. 

@MAV_CB 

Somewhat easier to demonstrate than to explain...

 

Attached is a sample app that demonstrates the reordering of a list.

It is UI based - meaning that the user initiates the action to change the order via up and down arrows.

 

Check the OnSelect actions of the up and down arrows.  There is very little there, but it does what is needed.

 

I hope this is helpful.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Thanks @RandyHayes . Unfortunately I can't open the raw .msapp file. It needs to be exported from PowerApps environment and into a zip file. 

@MAV_CB 

Please download the msapp file that was attached.  Then go into PowerApps and either create a new app (doesn't matter what kind) or open an existing.   Once in the designer, choose File, then Open and browse to the downloaded file.  It will open, there is no export needed.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

*facepalm* Duh. Thanks, been a long week :).

 

This works great. Thanks for your help!

@MAV_CB 

LOL...no worries!  Glad it helped out.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

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!

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.

Users online (1,194)