I am trying to sort a repeating group by a dynamic calculation for an application that “matches” users by similarity. The idea is that every user answers a set of questions and the answers are stored numerically. The repeating group then shows the current user other users with the most similar answers. Most similar users should show at the top.
Currently i am trying to sort the RG using a dynamic field calculated with mathjs: The dynamic fiel is calculated as average difference over all questions (currently using an older built of mathjs, as the newest version returns text, not numbers). The RG does not do the sorting however.