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

yet another question about acces section

Hi there !

I'm completely new to Qliksense and I'm quite confuse with the section access system (i, Qsense enterprise) .Here is my problem.

I have 4 SQL tables:

  1. UserTable:that lists the users in the field userID ("Mydomain\Account" )
  2. DeptTable: that lists of the departments in the field GroupID ("dep1", "dep2"...)
  3. role_user:  that makes the join between the previous two. One user may be in many departments.
  4. dataTable with all the lines of datas that I want to restrict using  the user's department(s) in the field GroupID

Reading the help, I guess I don't even have to bother with the first 2 tables. The role_user should be enough to handle the security.

If I got it right, the section access should looks like:

section access;

LIB CONNECT TO [myserver(myaccount)];

LOAD [USERID, GROUPID

SQL SELECT "User_ID" ,   "GroupID"

FROM "DB"."dbo"."role_user"];

section application;

LOAD... the dataTable that contains the data fields and the  GroupID field

And of course, It dosent work.

Could someone gives me a simple example of what need to be done ?

Thank you very much in advance.

Fred

2 Replies
hic
Former Employee
Former Employee

The syntax is wrong. You need to remove the square brackets and change to upper case:

LOAD USERID, GROUPID ;

SQL SELECT "User_ID" as USERID,   "GroupID" as GROUPID

FROM "DB"."dbo"."role_user";

Further, you need to have a reducing field also - a field that links the table(s) in Section Access to the real data. Is this the GROUPID, or?

See A Primer on Section Access. This post is about QlikView and not Qlik Sense, but most things are the same. The only difference is really that NTNAME is replaced by USERID and GROUP.

HIC

Not applicable
Author

Thank you for your fast answer !

It is indeed GROUPID that I intended to use as the reducing field.

I will read your link carefully.

thanks again !

Fred