Sorting based on multiple inputs

It’s very common to sort by multiple parameters but the more you sort by the more list levels you have to deal with. This isn’t hard, but it can get messy if you’re not super comfortable with list levels yet.

The easiest thing to do is just combine values. Rather than sorting by one value, then a second, then a third, and so on… just concatenate all your values into a single string then use SortByKey to sort the sublists by that value.

Just keep in mind that numeric values will sort by character instead of by value this way. You can either break up your parameters to handle numbers and strings separately or you can pad your numeric values so they sort “correctly”.