Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone
I have an app with two feedback datasets — teacher feedback (TeachersResponse) and student feedback (StudentsResponse). The requirement is to restrict educators to see only their own feedback data across both sheets. Below is my data model
The teacher feedback uses T_InstructorName and student feedback uses S_InstructorName — both contain the same educator name values but are intentionally kept separate as they serve different sheets.
Since Section Access only supports one reduction field, I created SA_INSTRUCTORNAME (uppercase as required) and placed it in TeachersRatingBridge which associates to TeachersResponse via T_InstructorName:
Section Access;
LOAD * INLINE [
ACCESS, USERID, SA_INSTRUCTORNAME
ADMIN, DOMAIN\ADMIN, *
USER, DOMAIN\EDUCATOR1, 20_MR_LI
];
Section Application;
// SA_INSTRUCTORNAME added to TeachersRatingBridge only
TeachersRatingBridge:
LOAD
T_InstructorName,
UPPER(T_InstructorName) AS SA_INSTRUCTORNAME,
...
Resident TeachersRatingTable;
The reduction is not cascading. The restricted user still sees all 22 distinct T_InstructorName values and 23 distinct SA_INSTRUCTORNAME values — confirming no filtering is applied at all.
Placing SA_INSTRUCTORNAME in both RatingBridge and TeachersRatingBridge causes a circular reference. Placing it in LinkTable (which bridges both tables via Student_TeacherKey) does not filter the fact tables. Placing it directly in TeachersResponse and StudentsResponse causes synthetic keys.
What is the correct placement of the reduction field SA_INSTRUCTORNAME in this data model to ensure Section Access filters both TeachersResponse and StudentsResponse without causing circular references or synthetic keys?
Any guidance is appreciated. Thanks.
Hi @Sivanesan,
This would be quite hard to help without seeing the records. Can you please provide us a screen shot of the LinkTable records? Just a few rows, especially with the Student_TeacherKey and SA_INSTRUCTORNAME fields.
Also, do you know how to simulate Section Access. Comment out the Section Access Statement from your Load Script, create a Table Chart with all the Section Access tables - in your example the INLFED table. Make selections on this table - one instructor name at time - and see how your records respond to the selection - it should give you a good representation of how the real Section Access will work in your app.
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Put SA_INSTRUCTORNAME in a separate Section Access bridge table that links to both feedback tables through a common key.
Do not put it in TeachersResponse, StudentsResponse, or multiple bridges.
Model:
Section Access
|
|
SecurityBridge (SA_INSTRUCTORNAME + Key)
|
LinkTable
/ \
Teacher Student
The reduction will work only if the security table has a valid association path to both datasets. Ensure the instructor names match exactly.
Hi @Sivanesan
I have recreated your datamodel in my end and setting the reduction field both as your image and as your code, it works fine for me. Hence, it doesn't seem an issue with the code.
It seems more like a mismatch between the values in field SA_INSTRUCTORNAME set in the inline and the one that comes from UPPER(T_InstructorName). Or maybe the user you are testing DOMAIN\EDUCATOR1 is being considered an ADMIN. What happens if you set the same reduction in the ADMIN row? If the data is reduced, I think then it is not an issue in the code, but in the user administration.
Kind Regards
Daniel