Sorting by keys not working as expected

I have a project with sheets numbers such as 1.1 and 50.1 and 2 and so on, I can’t sort by function because the sheet numbers are a string value, I tried sorting by keys but it’s not working correctly (see picture below), I know I can create a new integer parameter in Revit and feed it the sheet numbers and then using sort by function, but I fell that’s an overkill and maybe someone can help me

Can’t you sort your list after your string.tonumber node? (With List.Sort) and then IndexOf and GetItemAtIndex node to get the correct items.

1 Like

I don’t know what to tell, I never thought of it… Thanks a lot :slight_smile:
I’ll post a screenshot of your answer, maybe someday it’ll help someone

1 Like