Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to set up user access, so
Section Access;
LOAD * INLINE [
ACCESS, NTNAME, SALESPERSON, COUNTRY
ADMIN, ADMINISTRATOR, *, *
USER, USER1, VIGGO, *
USER, USER2, JOHAN, *
USER, USER3, ANNIE, *
USER, USER4, HAKAN, *
USER, USER5, PIOTR, *
USER, USER6, HELEN, *
USER, QLIKUSER, VIGGO, SWEDEN
USER, QLIKUSER, *, FINLAND
USER, QLIKUSER, *, NORWAY
];
The result is that QLIKUSER can see all records in Finland and Norway... and Sweden!!! He should seet only Viggo's records in Sweden but he sees all records for the rest of users.
Is the desired data reduction possible in Qlikview?
Many thanks in advance!
Josetxo
Well, with some help from our partner we have what we wanted. Hidden script:
Section Access;
[SECURITY]:
LOAD
NTNAME,
ACCESS,
REDUCTION1,
REDUCTION2
FROM Reductions.xls (biff, embedded labels, table is Security$);
Section Application;
STAR IS *;
Access:
LOAD
REDUCTION1,
SalesPerson
FROM IReductions.xls (biff, embedded labels, table is Reduction1$);
Access2:
LOAD
REDUCTION2,
Country
FROM Reductions.xls (biff, embedded labels, table is Reduction2$);
The Reductions.xls file looks like this:
Security sheet:
NTNAME | ACCESS | REDUCTION1 | REDUCTION2 |
ADMINISTRATOR | ADMIN | ALL | ALL |
USER1 | ADMIN | VIGGO | ALL |
USER2 | USER | JOHAN | ALL |
USER3 | ADMIN | ANNIE | ALL |
USER4 | USER | HAKAN | ALL |
USER5 | USER | PIOTR | ALL |
USER6 | USER | HELEN | ALL |
QLIKUSER | USER | VIGGO | ALL |
QLIKUSER | USER | ALL | SWEDEN |
QLIKUSER | USER | ALL | FINLAND |
QLIKUSER | USER | ALL | NORWAY |
Reduction1 sheet:
REDUCTION1 | SalesPerson |
ALL | * |
VIGGO | Viggo Mortensen |
JOHAN | Johan Muller |
ANNIE | Annie Hall |
HAKAN | Hakan Mild |
PIOTR | Piotr Volkov |
HELEN | Helen Lindt |
Reduction2 sheet:
REDUCTION2 | Country |
ALL | * |
SWEDEN | Sweden |
FINLAND | Finland |
NORWAY | Norway |
Thanks to you all who helped me!
Hi Josetxo,
You could try loading it from an excel file. Put the details in an excel file then load it like this.
SECTION Access;
Directory;
LOAD
ACCESS,
NTNAME,
PASSWORD,
upper(SALESPERSON) as SALESPERSON,
upper(COUNTRY) as COUNTRY
FROM
access.xlsx
(ooxml, embedded labels, table is Sheet1);
Regards,
Janzen
HI,
Can you attach your script in data model which has Salesperson and Country fields? Your datamodel should have this fields then it will automatically restricts.
Regards,
Jagan.
Well, with some help from our partner we have what we wanted. Hidden script:
Section Access;
[SECURITY]:
LOAD
NTNAME,
ACCESS,
REDUCTION1,
REDUCTION2
FROM Reductions.xls (biff, embedded labels, table is Security$);
Section Application;
STAR IS *;
Access:
LOAD
REDUCTION1,
SalesPerson
FROM IReductions.xls (biff, embedded labels, table is Reduction1$);
Access2:
LOAD
REDUCTION2,
Country
FROM Reductions.xls (biff, embedded labels, table is Reduction2$);
The Reductions.xls file looks like this:
Security sheet:
NTNAME | ACCESS | REDUCTION1 | REDUCTION2 |
ADMINISTRATOR | ADMIN | ALL | ALL |
USER1 | ADMIN | VIGGO | ALL |
USER2 | USER | JOHAN | ALL |
USER3 | ADMIN | ANNIE | ALL |
USER4 | USER | HAKAN | ALL |
USER5 | USER | PIOTR | ALL |
USER6 | USER | HELEN | ALL |
QLIKUSER | USER | VIGGO | ALL |
QLIKUSER | USER | ALL | SWEDEN |
QLIKUSER | USER | ALL | FINLAND |
QLIKUSER | USER | ALL | NORWAY |
Reduction1 sheet:
REDUCTION1 | SalesPerson |
ALL | * |
VIGGO | Viggo Mortensen |
JOHAN | Johan Muller |
ANNIE | Annie Hall |
HAKAN | Hakan Mild |
PIOTR | Piotr Volkov |
HELEN | Helen Lindt |
Reduction2 sheet:
REDUCTION2 | Country |
ALL | * |
SWEDEN | Sweden |
FINLAND | Finland |
NORWAY | Norway |
Thanks to you all who helped me!