Reorder items based on multi column sort

Solved190 viewsTips and Techniquesreorder sorting
0

Is there a way to reorder items based on a multi-column sort. I’ve got a list of university courses that belong to departments and in turn faculties. Every so often names change, departments merge and courses can even move departments. I know I can reorder row by row or blocks of rows by using ctrl and the arrow keys but is there a way I can sort my data and then apply it across all views?

I’ve got an attribute matrix where for each row (course) I’ve got columns for department, faculty, level and so on. I can use the multi-sort option to list the courses by faculty>department>level>course and that work great. I go to another matrix and they’re just in the original order.

Any ideas how I can lock in the new order?

thanks

John

Tahir Answered question November 1, 2023
0

Hi John, it’s tricky to “lock” in the sorting in other matrices where the Course category is linked.

I might tackle this by adding a hard-coded/input column to your Attribute matrix that drives the sort in other matrices. Of course, to synchronize the order of the items everywhere, you’ll either need to a) add that Sort item to each matrix and sort accordingly, or b) wait until you’re ready for Canvases/presentation mode and just snap the Attribute matrix to each of your other course-related matrices.

Attaching a screenshot here – hope it sparks some ideas.

Lyndsey

JLumley Posted new comment November 2, 2023

Attachments

sort.PNG

Thanks Lyndsey, I’ll have a go at those methods.

1

Hi jefcc,

Yes, it is possible to reorder items based on values via script. See basic version below. It should be clear that in a sorted matrix, Quantrix sees only original (unsorted) item position (index). You can check it by adding item with #category formula in the sorted matrix. So, concept of sorting and reordering somehow different. It is not an easy task, if you really would like to implement this script please contact me via email ttahirov@smartmodelingsolutions.com

Tahir Answered question November 1, 2023
0

Tagging on a follow-up question: What if we wanted to permanently update the position of an item using a Sort column? Is there a script we could write?

Attached image is the final result I’m looking for. Item positions are changed and no Sort active.

jeffc Answered question October 30, 2023

Attachments

Item-Sort.jpg