Permissions to PrivateMembersData

Hi all,
Let me play out the scenario I am in. I have a tutoring website, which allows two roles of user to login, “Teachers” and “Students”. I wish to allow the “Teachers” to record lessons against “Students”.

I have created a form, everything populates fine with exception of the Student reference, because the Teacher only has access to their own Site Member record (PrivateMembersData).

It appears I cannot give Teachers the privileges to see PrivateMembersData.
I have also tried creating a new table to store student data then populate a hidden variable on the form, but wix is too clever for that.

Any ideas how I can achieve what I require? The only thing I can think of, is doing a post submission update to the record using a backend script (not even sure if this is possible). PLEASE HELP!

To do that you’ll have to run a query on the backend (it cannot be done on the front-end due to security requirements).
On you backend you can run a query to retrieve the data from the PrivateMembers collection if you use suppressAuth.

For the backend function use a jsw file, and import the module to the front end, where the teacher will be able to use it.

Thank you I’ll give it a