Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
The #1 reason QlikView customers adopt Qlik Sense is a desire for a modern BI experience. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Hide particular field value from a user

Hi All,

I've 3 users and list of customers. For the users 1 and 2 i want to show all customers data and if the user 3 logs in, i want to show all customers data except one customer.

I tried to use the below expression but not getting the value as expected.

=if(OSUser()='user3',sum({<CustomerCode-={'A'}>}SalesValue*SalesQty),sum(SalesValue*SalesQty))

Kindly help me to correct above expression.

Thank you.

Regards,

Viresh

Labels (1)
7 Replies
Highlighted
Specialist
Specialist

Re: Hide particular field value from a user

Why don't you go for section access?

create a key which has all except one customer associated and another key with all customers associated

and then use this key in row level reduction in section access.

Highlighted
Partner
Partner

Re: Hide particular field value from a user

I agree with @passionate  that Section Access sounds like the prefered way to go.  

https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/Security.htm

Alternatively, if you have a Publisher, you can create different distributions for the two user types.

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
Creator III
Creator III

Re: Hide particular field value from a user

Hi, Thanks for the reply.

I've around 1000+ customer codes and it will increase. Is it possible to share some demo script for the same.

Regards,

Viresh

Highlighted
Specialist
Specialist

Re: Hide particular field value from a user

Please find below example script:

CustomerTable:
LOAD * INLINE [
CUSTOMERS, Sales
A, 122
B, 3
C, 423
D, 2
E, 3
F, 54
G, 52
H, 2345
I, 525
J, 25
K, 2454
L, 24542
M, 52
N, 4524
O, 5
P, 25
Q, 24
R, 5
S, 25
T, 2
U, 524
V, 43
W, 6
X, 54
Y, 5
Z, 467
];

MappingTable:
LOAD * INLINE [
FLAG, CUSTOMERS
ALLEXCEPTONE, A
ALLEXCEPTONE, B
ALLEXCEPTONE, C
ALLEXCEPTONE, D
ALLEXCEPTONE, E
ALLEXCEPTONE, F
ALLEXCEPTONE, G
ALLEXCEPTONE, H
ALLEXCEPTONE, I
ALLEXCEPTONE, J
ALLEXCEPTONE, K
ALLEXCEPTONE, L
ALLEXCEPTONE, M
ALLEXCEPTONE, N
ALLEXCEPTONE, O
ALLEXCEPTONE, P
ALLEXCEPTONE, Q
ALLEXCEPTONE, R
ALLEXCEPTONE, S
ALLEXCEPTONE, T
ALLEXCEPTONE, U
ALLEXCEPTONE, V
ALLEXCEPTONE, W
ALLEXCEPTONE, X
ALLEXCEPTONE, Y
];

Section Access;
LOAD * INLINE [
ACCESS, USERID, FLAG
ADMIN, ABC,
USER, XYZ, *
USER, MNO, ALLEXCEPTONE
USER, PQR, A
];
Section Application;

Highlighted
Partner
Partner

Re: Hide particular field value from a user

@passionate Your example will not work. User PQR wont see a thing and only the ADMIN ABC will see the  Customer Z.

 

CustomerTable:
LOAD * INLINE [
CUSTOMERS, Sales
A, 122
B, 3
C, 423
G, 52
H, 2345
I, 525
N, 4524
X, 54
Y, 5
Z, 467
];

Section Access;

/* OBS: important that you can reach all CUSTOMERS with selections in the SA_CUST field*/
SA_CUSTOMERS: LOAD 'ALL' as SA_CUST, CUSTOMERS RESIDENT CustomerTable; LOAD 'ALLEXCEPTONE' as SA_CUST, CUSTOMERS RESIDENT CustomerTable WHERE CUSTOMERS <> 'A'; LOAD CUSTOMERS as SA_CUST, CUSTOMERS RESIDENT CustomerTable; SA: LOAD ACCESS, USERID, SA_CUST INLINE [ ACCESS, USERID, PASSWORD, SA_CUST ADMIN, ABC, 123 USER, XYZ, 123, * USER, MNO,123, ALLEXCEPTONE USER, PQR,123, A ];

Robot surprised Please be careful when laborating with section access. It is possible to lock your self out of an application and never be able to open it again. I recomend you to take a backup of the qvw before proceeding with the section access implementation. 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
Specialist
Specialist

Re: Hide particular field value from a user

@Vegar Yes, you are right the above script was just for example. How to create flag and use in section access.

 

 

Highlighted
Digital Support
Digital Support

Re: Hide particular field value from a user

Hey guys, do not forget about the OMIT system field in Section Access, that allows you to hide fields for some users, this should be in the link that was pasted above, but I am pasting again, scroll down to the Section Access System Fields section, OMIT is described there:

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Security.htm

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.