Why isnt this sort function working

No worries. If you’re interested in more ‘funky’ blueprint nodes, there’s always this ( free ) library:

Although, watch out, it might need Visual Studio ( also free ), when it comes to project packaging.