Blocking user access to a field using OMIT
It can sometimes happen that some fields in a document should not be seen by some users while being available to others. A classic case might be an HR document, where some users can see the list of employees but might not be able to see the Salary
field.
We do this by associating the users with a field called OMIT
. Now, this is QlikView, so it doesn't have to be a 1:1 association, and users can be associated with multiple OMIT
values.
Getting ready
Load the following script:
Section Access; Access: LOAD * INLINE [ ACCESS, USERID, PASSWORD, OMITGROUP ADMIN, admin, admin, USER, user1, user1, USER, user2, user2, SALARYONLY USER, user3, user3, SALARYANDABSENCE USER, user4, user4, ABSENCEONLY ]; OmitGroups: LOAD * INLINE [ OMITGROUP, OMIT SALARYONLY, Salary SALARYANDABSENCE, Salary SALARYANDABSENCE, Absence ABSENCEONLY, Absence ]; Section Application; //Employees: LOAD * INLINE [ EmpID, Name, Salary, Absence 1, Joe...