How sort 2 lists

I have 2 lists.
One of them is Family type list
Another value of Names of family type i got it from excel file. I need to sort, somehow, first list with Family type from Names. So them can match with each other.
How can i do this?

Hello @bultekovbim and welcome…try something here…

It worked. TY
But i cant properly SetParameter now.
If i use Flattern nod it worked. But if i try to safe my list nesting - mistake appers. I think this is about “empty list” situation

Hi…not sure can you share your rvt and your excel sheet…

If my translator is working correctly, the error is being caused by the empty list. Use List.Clean and see if that fixes the error.

1 Like

Yeah agree al ist clean or a flatten as the user always have tried and should work…im just curious why there are empty list :wink:

1 Like

Oh yeah. Never thought about that.

1 Like

think why is happend is search on names there doesnt exist in the project…think index of instead of all indicies would help on that…if i understand right :wink:

TY fo help. Clean nod worked in my case better then Flatten

I used earlier in script list.filter.
I removed it and use yours solution above to sort lists. I dont have pre filtration because of that happends Empty list