Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
amars
Specialist
Specialist

Section Access to hide a specific value or row in a specific table

Hi all,

I have a security requirement for one of our HR Applications, where we are asked to hide only the salary info for specific person. For e.g. CIO of the organization can view all the data for the CEO except for the salary info.

As we just need to hide salary info for certain person/s we are unable to use data reduction. Does anyone suggest an easier solution for such scenario.

Thanks in advance

Best Regards

Amar 

1 Solution

Accepted Solutions
tresesco
MVP
MVP

You can try using generic key strategy. Try something like:

Section Access;
Load * Inline [
USERID, ACCESS, SAL_FLAG
ADMIN, ADMIN,
CIO, USER, EMP1_WITH_SAL
CIO, USER, EMP2_WITH_SAL
CIO, USER, CEO_NO_SAL
];
Section Application;
	 
t1:
Load *,
	 EMP&'_'&'WITH_SAL' as SAL_FLAG
Inline [
EMP, ADDRESS, SAL
CIO, ABC, 99
CEO, XYZ, 101
EMP1, MNO, 11
EMP2, BCD, 22
];
t2:
Load EMP, ADDRESS,
	 null() as SAL,
	 EMP&'_'&'NO_SAL' as SAL_FLAG
Resident t1	where EMP='CEO' ;

 For more complex scenario handling, have a look here:

https://community.qlik.com/t5/Qlik-Design-Blog/Basics-for-complex-authorization/ba-p/1465872

https://community.qlik.com/t5/Qlik-Design-Blog/Authorization-using-a-Hierarchy/ba-p/1476319

View solution in original post

2 Replies
tresesco
MVP
MVP

You can try using generic key strategy. Try something like:

Section Access;
Load * Inline [
USERID, ACCESS, SAL_FLAG
ADMIN, ADMIN,
CIO, USER, EMP1_WITH_SAL
CIO, USER, EMP2_WITH_SAL
CIO, USER, CEO_NO_SAL
];
Section Application;
	 
t1:
Load *,
	 EMP&'_'&'WITH_SAL' as SAL_FLAG
Inline [
EMP, ADDRESS, SAL
CIO, ABC, 99
CEO, XYZ, 101
EMP1, MNO, 11
EMP2, BCD, 22
];
t2:
Load EMP, ADDRESS,
	 null() as SAL,
	 EMP&'_'&'NO_SAL' as SAL_FLAG
Resident t1	where EMP='CEO' ;

 For more complex scenario handling, have a look here:

https://community.qlik.com/t5/Qlik-Design-Blog/Basics-for-complex-authorization/ba-p/1465872

https://community.qlik.com/t5/Qlik-Design-Blog/Authorization-using-a-Hierarchy/ba-p/1476319

mcowley1
Contributor II
Contributor II

If it's only one field in one table, we've used an IF statement for this case: Something like IF(OSUser()= CIO, '-', Salary)