Creating a matching algorithm and sort repeating group

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.

Any ideas why this does not work / how to do it?

Hey @d9999, did you find a solution ?

not really, but what i did is making the questions just ‘yes’ or ‘no’ and store the answers in a list. Then use the intersect function to compare both lists and see to what degree they match…

As I explain in this recent thread, you can use my List Shifter plugin to do this (sort a list via some property that is not a direct property of the items in the list):

1 Like