Slices and users

I have a “users” table where I insert email and the name of the professor. In the questionnaire table I ask the pupil to enter the name of their teacher. How can I make sure that the teachers, entering with their email, see only the students of their competence? I hope I explained myself well … I tried with the slices but I just can’t understand how I can do it … please can you give me a hand?

0 13 112
13 REPLIES 13

Aurelien
Google Developer Expert
Google Developer Expert

Hi @AdministraCED_italy

Please find below my suggestion:

Assuming you have a table “Users” with minimal columns:

  • [Users] ==> set as key-column, type Email
  • [Profile] ==> type Enum, values “Student” or “Professor”

Assuming you have a table “QuestionnaireLog” with minimal columns:

  • [key] ==> set as key-column, type Text, initial value expression UNIQUEID()
  • [Student] ==>type Ref, source table name Users, initial value expression USEREMAIL()
  • [Teacher] ==> type Enum, base type Ref, source table name : Users, Valid_If expression: FILTER("Users", [Profile]="Professor")

So, the slice “MyStudents” for your teachers will have a row filter condition:
USEREMAIL()=[Teacher]

Let us know if that works for you !

I have two different applications: one for compilation by students and one for visualization by professors. each professor accesses with their own email, inserted in a special table with the professor’s name and email, while the students, when filling out the app, report only the professor’s name. Each professor enters the app with his email and displays only his students.

OK.

Can you show us your current table structure, slice, and UX views ?
Screenshot are best.

Hi @AdministraCED_italy

Thank you for providing these details.

On your Slice, you may want to set a row filter condition:
[AMMINISTRATORE]=USEREMAIL()
Let’s name this slice “myStudentAnswers”.
You may want to change the “Update mode” into Updates only, or Read-Only, or whatever you want in order to avoid accidental deleting.

And then, set your view RIPOSTE with “For this data”: myStudentAnswers

Let usknow if that works for you.

I don’t see any difference. I don’t understand how I have to do to make sure that everyone only sees those of their own competence

I have two tables.
One where I have Name and email address, the second one is filled in by the various people through the other app. People who fill in from the other app indicate only the name, not the email address.
In this app, on the other hand, the various people who can use the app (ie those who are included in the “administrators” list) see only those where people have indicated their name.
I don’t know if I have explained myself correctly.
Basically there should be a match between the name and email of the different administrators

Aurelien
Google Developer Expert
Google Developer Expert

Hi @AdministraCED_italy

You are correct on this point:

However, perfect match never exist.
This is why you may prefer using USEREMAIL() instead.

Similarly:

This is risky. If one student states its name is “Paolo RUGGIERI” and you have in your student table “Paolo Ruggieri”, it’s lost.
Furthermore, provided you have two student with the same name, you will meet another issue because you can’t distinguish who’s who.

In my opinion, when it comes to identify people, everything should be based on user email.

About that:

you may want to set the email address as key, and set the name as label.
For users, they will only see names and never the address email.
That may be what you are looking for ?

Here is an example below:


For reference:

THANK YOU ALL, I SOLVED

Top Labels in this Space