This is possible to be done by CODE-ONLY.
You will need a bunch of CUSTOM-CODE to generate such a function.
Datasets → are not FLEXIBLE.
You will have to use → Wix-Data and CODE.
Also you will need the Wix-Members-APP to be installed including the ROLE & BADGES-System.
And maybe you even will need a custom generated LOGIN-System.