¿How can I slice ref rows in an entry form for each user?

I have three table slices: [doctors], [patients] and [appointments], all the table slices are sliced with the condition UserEmail=USEREMAIL(), doctors are the final users, so that each doctor see he´s patients only, he´s appointments only and he´s colleagues only. Everything works fine in each view.

My problem is that when (Doctor A) makes a new appointment in the new appointment form, the [Patient] dropdown menu displays all the patients unfiltered

Solved Solved
0 3 359
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

For better performance and security, consider using security filters rather than slices.

View solution in original post

3 REPLIES 3

@Rene_Casana_Amaya
In your Patients table/slice, do you have the associated [Doctor] info? If so, you can set the below Valid_if expression to the [Patient] column in the Appointment_Form. Please change the tablename and column names as required by your table/app schema

SELECT(
	Patients[PatientName],
	[Doctor]=[_THISROW].[Doctor]
)

Steve
Platinum 4
Platinum 4

For better performance and security, consider using security filters rather than slices.

Oh that was easy, worked fine and I got rid of many slices.

Top Labels in this Space