Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I have three tabs (tab names are stats, applications and products)in the dashboard, the first 2 tabs should be visible and 3rd tab should not be visible for couple of users.
And the three tabs should be visible for couple of users.
Could you pls let me know how to implement on this security?
Thanks,
Yes,
You need to implement section access and section application and add a column in section access like that:
section access;
LOAD [ACCESS],
NTNAME,
SHEET, //GROUP OF ACCESS SHEET
[USERID],
[PASSWORD],
upper([USERID]) ,
upper([USERID])
FROM table1;
and section application like that:
LOAD SHEET, //GROUP OF ACCESS SHEET
SH01, // VALUE 1 OR 0 (1 IF VISIBLE)
SH02 // VALUE 1 OR 0 (1 IF VISIBLE)
FROM table2;
And then, for each sheet, go to properties and adda condition of display the sheet like that:
SHEET(« SH01 »)>=1
before the section application put that:
section application;
star is *;
Thanks for your quick reply, I heard that we can do it in conditional properties, how we can do it.
Thanks,
Hi,
If there's only conditional for four users, you can do in the sheet properties, General, Show Tab, Conditional:
Match(Upper(OSUser()), 'DOMAIN\ALLOWEDUSERNAME1', 'DOMAIN\ALLOWEDUSERNAME2')
There's no problem adding a section access.
Hope that helps.
But, I am not sure how to implement that should I need to copy above script and paste it into edit script or someway?
pls guide me.
Thanks,
Hello,
In case of the section access, yes, you need to copy that in the script.
My solution is in the sheet properties itself: go to an empty area of your sheet, right click with the mouse, select "Properties", then go to the "General" tab in the dialog that will show up, select "Conditional" in the "Show Sheet" section, and then use the code I posted above with your own domain and usernames.
Since QlikView is case sensitive for Match(), I've used Upper() and set usernames in capitals. It would be more appropiate to use MixMatch() function instead:
MixMacth(OSUser(), 'Domain\AllowedUserName1', 'Domain\AllowedUserName2')
Both should work fine.
Hope that helps.
Hi,
If 1 or 2 users ok, suppose if I have more than 100 users then what is condition to work it out.
Thanks,
Hi,
In both cases (section access or mixmatch function) you are going to add one by one all users with access and restrictions. You can load those "Domain\Users" from an excel, database, or inline table, and then use something like
Users:LOAD 'DOMAIN\User' & Chr(65 + Rand() * 20) AS ID // users allowed or restrictedAUTOGENERATE 20; ToVariable:LOAD Concat(DISTINCT ID, chr(39) & ',' & chr(39)) AS AllUsers // needed to create the variableRESIDENT Users; LET vUsers = chr(39) & Peek('AllUsers', 0) & chr(39); // All users quoted and separated by comma DROP TABLE ToVariable;
The conditional is the same, although referring to a variable
MixMatch(OSUser(), $(vUsers))
Will return greater than zero (true) if the user that is logging is in the list of allowed users.
Hope that helps