I’m looking for a way to reorder or move selected items up and down in a Multivalue Lookup Column. The list to select from is ordered correctly but the selected items are ordered by how they were selected. Our end users would like to move these items up and down the list. Is this possible with JQuery or SPServices? I’m using SharePoint 2007 currently. Thanks in advance for any advice anyone can provide.Â
Yeah it does. I’ll look into playing around with the sortable JQuery. I have been surprised to find this not available or not previously done by everyone since this is a pretty common form interface feature on the web. Thanks again
Actually, I wasn’t suggesting you use the checkboxes, and the reality is that the checkboxes are still storing in the order checked. I was just offering it up so you could see how values are stored for multi-value lookup fields. They’re stored in a weird string involving pipes (|) and t characters. To allow for them to be re-arranged, you’ll need to rearrange that underlying string, as well as rearranging them in the visual interface.
SharePoint has a built in method that turns them into an array (referenced in my code), so you could possibly do some array sorting of some sort. I guess the way I’d tackle it is to use jquery to allow for moving up and down in the visual element (maybe with this: http://jqueryui.com/sortable/) and then rebuild the string on the back side at some point. I’m not sure it would rebuild fast enough if you did it on every change, though.
Oh, and caveat – I missed that you were doing 2007. This method works with 2010. I’m not sure about 2007. I don’t have an environment to test in.
Make sense?
Thanks for the link. We have a rather long list of items to select from so I’m not sure this solution would be useful. Did you try rearranging those check boxed items? For instance to change priority.
Thanks!
So, this doesn’t answer your question directly, but I did just do a bunch of fiddling with multi-value lookup columns, and the code I have in this post might help you wrap your head around how the values are stored:
http://deannaschneider.wordpress.com/2013/10/31/replacing-multi-select-lookup-field-with-checkboxes/