Sorting repeater by calculated value for each item (not by saved field in the collection)

Situation: I have a collection where the geographic position (lat, long) for each field is saved (these fields represent products, for example a t-shirt).
Whenever a search is performed on this collection, the results must be sorted by the distance between the user and each field.

Problem:
I can’t sort the elements of the repeater using the data I calculated using the function that calculates the distance.

Note: I cannot save the data of the distance between user and product on the collection because this data changes every time a user makes a new search and the repeater is populated.

I have tried in every way and I am looking for everywhere but I still have not found a solution. Anyone have any suggestions?

Hello @alegenioincompreso , did you figure this out? I´m having the same issue!

Unfortunately not yet…

Hello @Allesandro Boschiero

Apologies, but did you ever get a solution for this issue. Or any other alternative solution?

Thanks.