I am building an app for my medical reps who visit doctors on certain pharmaceutical products so every medical rep will be assigned to a certain product, and a certain number of doctors, and the medical rep should record his calls to doctors on daily basis
so what I used to have in my Access Web app the following tables:
1. Med reps: containing Med rep name, and other detail fields
2. Doctors: containing Doctor name, and other detail fields.
3. daily calls (Daily Reports): here the med rep records his calls so he/she enter his/her name (lookup to med rep table), date of the call, and other details of the call and most importantly name of the doctor (lookup to doctors table).
4. MedRepDoctorList: which contains two lookup fields: Med rep name (lookup to the med reps table) and doctor name (lookup to Doctors table)... and this table is used mainly for validation... e.g.: if med rep "A" is assigned to visit only Doctor "Y" and "X", then A will not be able to add a call record of visiting Doctor "Z", who is not included in his assigned doctor list. (I was able to do this using macros in Access).

now I am building my powerapp on CDS and moving my data into custom entities using the same structure described above... so what functions can I use to have the same validation as above?... or even better if there is a way to use the filter function that when the medical rep tries to add a call record for a doctor, s/he should add this doctor from the filtered list using table or entity no 4 (MedRepDoctorList).

 

thanks.