Hello everyone,
i have been working with Dynamo for a month roght now and ran into a Problem with sorting a list.
I did spend about 4 Hours on searching a trying diffenrent stuff out to make it work but without succes.

I have a List with sublists. I want all items in each sublist to follow the order of another list.
See the attached Picture. I did try a couple of solutions out as seen but it didnt work out.

Does anyone have a solution? i would like to have the order of the Fields from schedule.View and not an aphabetic order.

Steven
The Output from â€śList.FilterByBoolMaskâ€ť ist a List with 670 Sublists. Each Sublist from this List contains 15 Parameters. These 15 Parameters are in a Random Order. My Goal is to have the 15 Parameters in each Sublist to follow the Order of the List from the Node â€śList.Transposeâ€ť. It should seem easy but somehow I cant get it to work.

Nico_Stegeman
Thanks for your Reply. Sadly It didnt work out. The Node â€śList.SortByKeyâ€ť gives me the Error â€śThe number of Elements are not Matching the number of Keysâ€ť. But hey now the Type of my values for the Input to the Node are not any longer a Problem. Maybe im now a step closer to a solution.

I did read about the List.level and did try out diffenrent selections and did Change the Lacing to Long.

I did also see a Mistake in my Sublists. They each contained 16 Items. They should only contain 15 Items so filtered out one of the duplicatesâ€¦ So now ist 15 Items per Sublist.

I did also repeat the Fields from schedule.View so it now Looks exactly like the list i want to have from the Parameters.

Sadly the â€śList.SortByKeyâ€ť now worksâ€¦ and it sorts the List in a diffenrent wayâ€¦ but sadly not in my way:

Hi again,
after playing around i finally found a solution. My understanding of the node â€ślist.SortByKeyâ€ť was wrong.
After some research and testing I finally decided to use the Node â€śList.FirstIdexOfâ€ť for the â€śKeysâ€ť.
I used the Wrong-Order of the Parameter-Names to search the Index-Numbers of the desired â€śListâ€ť, to get the correct Keys for the Parameter-Names in the Node â€śList.SortByKeyâ€ť.