I’m still not entirely sure I know what you’re trying to do…
But I think you’re trying to sort a list by a field of a related thing (rather than a field on the datatype itself)?.. yes?
In which case This Thread should tell you what you need to know.