Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am working on a Qlikview application where I would like different sheets to be restricted to different users. Section access was the key. I have set up the below script and configuration settings within in Qlikview. When I enable the conditional setting (see below) on a sheet, the sheet disappears. This is of course what I want to happen but not for the admin account I am currently logged in as. I would only like it to happen to other users.
I have also noticed if I add a field in Qlikview view I can select my sheet name as options. For example 'Sales' has a value of 1 which makes sense if I wanted to read in values from a spreadsheet and make them part of my Qlikview application. But I do not. Instead I want: if sum of Sales is equal to greater than or equal to 1 then display the sheet. If less than 1 (AKA 0) then do not. Why are these values being displayed as field options? Code wrong?
Excel document: security.xlsx
Users sheet in Excel:
| USERID | PASSWORD | ACCESS | GROUP |
| ADMIN | 123 | ADMIN | |
| tom | tom | USER | GROUP1 |
| bob | bob | USER | GROUP2 |
| sue | sue | USER | GROUP3 |
| mike | mike | USER | GROUP4 |
Matrix sheet in Excel
| GROUP | Sales | SalesJoe | SalesBob | SalesJason | SalesScott | SalesComparsion | SalesLogixOpenTIckets | SalesLogixAllTickets |
| GROUP1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| GROUP2 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 1 |
| GROUP3 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 1 |
| GROUP4 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 |
Qlikview settings
Sheet Properties> Conditional> Sum(Sales)>=1
Document Properties> Opening> Initial Data Reduction Based on Section Access (checked) Strict Exclusion (checked), Prohibit Binary Load (checked> this is a stand alone application for now)
Document Properties> Security> Admin Override Security
SECTION ACCESS;
Directory;
LOAD [USERID],
[PASSWORD],
[ACCESS],
[GROUP]
FROM
(ooxml, embedded labels, table is Users);
Section Application;
Directory;
LOAD [GROUP],
Sales,
SalesJoe,
SalesBob,
SalesJason,
SalesScott,
SalesComparsion,
SalesLogixOpenTIckets,
SalesLogixAllTickets
FROM
(ooxml, embedded labels, table is Matrix);
I used this as my example so strong correlation will exist...
http://www.bracht.com.ar/espanol/servicios/documentos-qv/tecnicos/dataprotection.pdf
If you have any more questions/comments let me know. Thanks for any help.
for admin to view all sheets you need to add a group for admin giving 1 for all sheets. Another option is adding an OR condition in the 'Conditional Show'
, ie, Present condition OR QVuser()='ADMIN'
Well that was half the issue. Admin can now see all the pages. The other issue was the caps issue I neglected.
SUM(SalesBob)>=1 OR QVuser()='ADMIN' right way
SUM(SALESBOB)>=1 OR QVuser()='ADMIN' wrong way
The sheet names need to be lower case. The text for the conditional expression should be green not red.
This should have been more obvious sooner...