Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Access users - disable sheets

Hi, I've got multiple users for my project.
Now I want to disable a few worksheets for users...

I've got this code in my script:

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, SOORT, MISGROEP

    ADMIN, ADMIN, ADMIN, *

    USER, USERA, PASA, K, *

    USER, USERA, PASA, N, *

    USER, USERA, PASA, P, *

   

    USER, USERB, PASB, K, *

    USER, USERB, PASB, N,  *

   

    USER, IT, IT, * , M50103020100

   

    USER, ONDERHOUD, ONDERHOUD, *, M401010

    USER, ONDERHOUD, ONDERHOUD, *, M402010

];

Section Application;

LOAD * INLINE [

    USERID, Sheets, flag

    ADMIN,SH01, 1

    ADMIN,SH02, 1

    ADMIN,SH03, 1

    ADMIN,SH04, 0

    ADMIN,SH05, 0

   

    USERA,SH01, 1

    USERA,SH02, 1

    USERA,SH03, 1

    USERA,SH04, 0

    USERA,SH05, 0

   

    USERB,SH01, 1

    USERB,SH02, 1

    USERB,SH03, 1

    USERB,SH04, 0

    USERB,SH05, 0

   

    IT,SH01, 0

    IT,SH02, 0

    IT,SH03, 0

    IT,SH04, 1

    IT,SH05, 1

   

    ONDERHOUD,SH01, 0

    ONDERHOUD,SH02, 0

    ONDERHOUD,SH03, 0

    ONDERHOUD,SH04, 0

    ONDERHOUD,SH05, 1

   

];

My question now is: What should I write in my condition in the property's of the worksheet? Something like =sum(SH1)> 0  ???

Regards

7 Replies
rustyfishbones
Master II
Master II

IF(QVUSER() = 'USERA')

Not applicable
Author

What do you mean... I need to make a condition in the worksheet property!

I must call I function like SH01.flag == 1 or something like this

calvindk
Creator III
Creator III

I am doing something similar for separating admins from users:

this is the function i use

=MAX(Match( Admins.Names, UPPER(OSUser())))

You should be able to modify that and put it in your conditional show field

Not applicable
Author

Can you explain me: Admins.Names ?

Is this the USERID or is OSUSER the id?

Not applicable
Author

Can somebody give a specific answer for my problem?

Regards

Not applicable
Author

in each of your sheets qlick on "settings" then "Sheet properties" then add a formula in the "Show Sheets " box

something like =sum(SH01)>0   In this case IT & ONDERHOUND would not see the sheet.

Also  depending upon how many users you have you may want to set your section access up as a table.

This is how I would do it.

Section Access;

//SH01 is used to control access to the customer profitability tabs on this report


star is *;
LOAD * INLINE [
ACCESS,USERID,PASSWORD,NTNAME,GROUP
ADMIN,*,*,GB\GG_QVTAB_QMFV_OWNER,*
ADMIN,*,*,GB\GG_QVRL_QMFV_OWNER,*
USER,*,*,GB\GG_QVTAB_QMFV_SH01,SH01
USER,*,*,GB\GG_QVTAB_QMFV_SH02,SH02
USER,*,*,GB\GG_QVTAB_QMFV_SH03,SH03];

Section Application;

T1:

load * inline

[GROUP,SH01,SH02,SH03

SH01,1,0,0

SH02,0,1,0

SH03,0,0,1];

Not applicable
Author

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, SOORT, MISGROEP

    ADMIN, ADMIN, ADMIN, *, *

    USER, USERA, PASA, K, *

    USER, USERA, PASA, N, *

    USER, USERA, PASA, P, *

   

    USER, USERB, PASB, K, *

    USER, USERB, PASB, N, *

   

    USER, IT, IT, *, M50103020100

   

    USER, ONDERHOUD, ONDERHOUD, *, M40101020100

    USER, ONDERHOUD, ONDERHOUD, *, M40201020100

];

Section Application;

LOAD * INLINE [

    USERID, SH01, SH02, SH03, SH04, SH05

    ADMIN,1, 1, 1, 0, 0      

    USERA, 1, 1, 1, 0, 0

          USERB, 1, 1, 1, 0, 0

          IT, 1, 0, 0, 1, 0

          ONDERHOUD, 0, 0, 0, 0, 1

   

];

The accounts are working, but still he shows every sheet :s