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

Limit tab view based on user logon

I know that you can limit the data a user can see by using the Section Access section of the script editor.  I have used this successfully many times.

If you have a QlikView app with multiple tabs, can you limit the tabs a person can see based on their logon ID?

Has anyone ever done this?

Thanks,

Ed

1 Solution

Accepted Solutions
b_garside
Partner - Specialist
Partner - Specialist

Basically you need to create a field in your Section Application code for determining what Tab should be hidden.

A Simple 1 / 0 binary will do then place that field. See below. I created a Field for each tab I wanted to be hidden for greatest control per user Role. ROLE will link the two tables together.

Section Access;

LOAD ACCESS,

  USERID,

  PASSWORD,

     upper(NTNAME) as NTNAME,

     ROLE

FROM

[Access_Control_List.xlsx]

(ooxml, embedded labels, table is Users);

Section Application;

LOAD

     ROLE,

     DASHBOARD,

     MARKETS,

     ACTIVEPIPE

FROM

[Access_Control_List.xlsx]

(ooxml, embedded labels, table is RoleAccess);

Capture.PNG

View solution in original post

9 Replies
alexandros17
Partner - Champion III
Partner - Champion III

In the conditional show of the tab make a comparison between your user (the one that has the pesmission to see the tab) and OSUSER()

Not applicable
Author

Yes, you have to use Sheet_ID instead of dimension in Section Access file.

Anonymous
Not applicable
Author

That is a good suggestion for a single user.  The client I am working with wants to limit a fairly large group of people and wants the ability to change the access by updating an external file and reloading.

Not applicable
Author

You can maintain the login and sheet_id in external file like xls.


Ex:
LOAD
NTNAME,
SHEET_ID
FROM
[..\User_Access.xlsx]
(ooxml, embedded labels, table is Sheet1);


See if this works!!!

b_garside
Partner - Specialist
Partner - Specialist

Basically you need to create a field in your Section Application code for determining what Tab should be hidden.

A Simple 1 / 0 binary will do then place that field. See below. I created a Field for each tab I wanted to be hidden for greatest control per user Role. ROLE will link the two tables together.

Section Access;

LOAD ACCESS,

  USERID,

  PASSWORD,

     upper(NTNAME) as NTNAME,

     ROLE

FROM

[Access_Control_List.xlsx]

(ooxml, embedded labels, table is Users);

Section Application;

LOAD

     ROLE,

     DASHBOARD,

     MARKETS,

     ACTIVEPIPE

FROM

[Access_Control_List.xlsx]

(ooxml, embedded labels, table is RoleAccess);

Capture.PNG

awhitfield
Partner - Champion
Partner - Champion

Hi Ed,

you can make them conditional e.g using the OSUSer() function, =if(OSUser() = 'XXXXXI\YYYYYYYYYYY',1,0)

HTH Andy

alexandros17
Partner - Champion III
Partner - Champion III

use this expressionin the conditional section of the tab:

=Index(Upper(USERS), Upper(OSUser()))>0

Where USERS is a variable obtained doing a concat of all the users comeing from an Excel file (separated by a blank)

let me know

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Sheet level access

Regards,

Jagan.

Anonymous
Not applicable
Author

Thanks, Brian.  That is what I was looking for.

Ed