Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm using the QlikView security in a qvw file.
I would like to know if there is a simple way to detect if a user is an admin, that is to say if the ACCESS field in the section access part is equal to 'ADMIN'. I have a little problem because that table is hidden.
Best regards
Hi,
In fact I've manage to do it using the line data reduction :
In the security table where I've the ACCESS field, I add an additional calculated field : FLAG_ADMIN : (if(ACCESS='ADMIN',1,0)) as FLAG_ADMIN,
Then in section Application I add a little table :
LOAD * INLINE [
FLAG_ADMIN
1
0
];
And last I open "Settings" / "Documents Properties" / "Opening Tab" and I check the option "Initial Data Reduction based on Section Access"
then, in my document, to know if my user is an admin I can use that field : if(FLAG_ADMIN ....
(Note : if a user is both USER and ADMIN you should use max(FLAG_ADMIN) instead
I also made an improvement request to QlikTech
Regards
Create a text object and inside the text you copy the below script
=QVuser( )
but this will tell which user has logged in to the document!
Thanks for your answer,
but that's not exactly what I'm looking for : the QVuser() function will show me the USERID field value (name of the QVUser) but not the ACCESS one (ADMIN/USER).
Do you have another idea ?
Best regards
No idea at all ?
I thought that point was an common one ?
Hi Bertrand!
Have you got any solution? If yes please let me know.
Hi, I have my security set up a little differently, it works like this:
LOAD ACCESS, USERID, PASSWORD, DEPT;
SQL SELECT *
FROM "sqltable1;
section application;
star is *;
ODBC CONNECT TO SQl;
LOAD DEPT, "ControlField";
SQL SELECT *
FROM "Sqltable2;
This is a little different to what you were looking for but might help, what this means is that the system identifies users based on a set list, then depending on their department limits them to the set of data they can view.
Maybe this will help?
Ben
Hi,
In fact I've manage to do it using the line data reduction :
In the security table where I've the ACCESS field, I add an additional calculated field : FLAG_ADMIN : (if(ACCESS='ADMIN',1,0)) as FLAG_ADMIN,
Then in section Application I add a little table :
LOAD * INLINE [
FLAG_ADMIN
1
0
];
And last I open "Settings" / "Documents Properties" / "Opening Tab" and I check the option "Initial Data Reduction based on Section Access"
then, in my document, to know if my user is an admin I can use that field : if(FLAG_ADMIN ....
(Note : if a user is both USER and ADMIN you should use max(FLAG_ADMIN) instead
I also made an improvement request to QlikTech
Regards
Hi Ben,
can you send an example from you you SQL-Table with Access-Fields or a quick QV-Dokument?
I don't see exatly how do you manage it?
I want to restrict each user to specific departments.
Each salesman can only see his departments
regards
Bumin
I tried this approach but it didnt worked.
Hello All ,
I tired to use this approach to hide a particular tab for users but with this settings , the Qlikview file doesnt open in Access Point. I t opens in the desktop though .
Please advise.
Thanks
Kusha Agrawal