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

A simple permission solution

Thought I would share this one. (QV v9 SR2 / IIS)

I needed a simple solution to show/hide Objects in QlikView. Normally we would want to show/hide particular sheets on a document but this script will work with any QV object so you can introduce a high level of granularity to the permission model.

For a proof of concept we pulled the permissions from a spreadsheet as in the example below;

NTLOGIN OBJECT
DOMAIN\USER01 SH01
DOMAIN\USER01 SH02
DOMAIN\USER01 CH02
DOMAIN\USER02 SH01
DOMAIN\USER03 SH01

This simple example could easily be expanded to a full relational database with link tables to include friendly object descriptions etc.

Step one is to load the permission spreadsheet near the start of the load script. (It doesn't have to be the first tab though)

Then to restrict access to a sheet with the ObjectID 'SH01'

Sheet Properties > Show Sheet > Conditional

add the following code;

=Count( {$*<OBJECT={"SH01"},NTLOGIN={$(=Upper(OSUser()))}>} NTLOGIN) > 0

To restrict access to a chart with the ObjectID 'CH01';

Chart Properties > Layout > Show > Conditional;

=Count( {$*<OBJECT={"CH02"},NTLOGIN={$(=Upper(OSUser()))}>} NTLOGIN) > 0

Note the change to the Object [ID] in each case. The Object ID is available from Properties > General

This seems to be working without a problem.

Now if I can just figure out how to pass the ObjectID automatically (i.e. Self) to the script!!!

Any suggestions to improve this code are welcome.

Tom.

Ouch QlikTech...Looks like you have 'Tag Bloat'. i.e. The list of tags presented to align new forum posts to. Could the number be reduced?

0 Replies