Toggle Sorting in Repeating Group Search Results

Here’s a link that has some good answers: Why is sorting a RG dynamically so difficult?