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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

7 REPLIES 7
RandyHayes
Super User III
Super User III

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

*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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (37,616)