Has anyone successfully been able to implement Repeating section item reordering/sorting? I can get it to work in the UI pretty easy using JQuery UI Sortable e.g.
The DOM does get reordered however it always saves in the order it was added. Anyone played around with re-ordering Repeating items or even programatically adding/removing items?
What you're seeing is exactly right. The content is stored in XML on the list item and referenced when loaded. So using jquery can allow the display of that to be modified because its not modifying the underlying data, just moving it around.
To reorder the contents in the repeating section you would need run an update against the field holding that content and then save that update to the list. I've done that in playing around, and used a Nintex workflow and the following actions:
You may need to loop through the XML to get it how you want it.
Hope that helps.
Thanks Eric. I was hoping we could access the underlying data on the client w/out having to implement a workflow. Is there someone we can ask where/what structure is holding the underlying data? Seems like more work and a bit superfluous to add another workflow just to have the items in the correct order.
Unfortunately I never heard back from Nintex. I'm afraid you'll have to do something similar to what Eric Harris recommended. It isn't terrible but will require jQuery and an additional workflow. Let me know if you need help with the approach.
In theory you can access the data if you pipe it out to a multi-link text field. You will see the data in an XML format. However if you're going to go through the trouble of writing something client side you are better off just using a workflow to do that instead. The actions are already there and you can force the workflow to fire when the info is submitted.
Just my thoughts
Are you able to provide a breakdown of your workflow so I could try to replicate myself? I am trying to reorder the Repeating sections based on the data in one specific field.
Is this achievable?