Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
indujanT
Contributor II
Contributor II

Section Access

Hi,

In our sales department, we have 6 Sales employees who are all using the same app.

My goal is to implement a section access security policy that allows each employee to view only their own data, based on their individual names. Despite my efforts, I haven't been successful in making it work.

Could someone please let me know if there's something I am missing?

//SECTION ACCESS;
Autorization:
LOAD * INLINE
[
      ACCESS,             USER.EMAIL,                        REDUCTION
      ADMIN,        admin@qlik.co.uk,                       *
             USER,        user@qlik.co.uk,                  Mark Street

];


SECTION APPLICATION;

LOAD
"List",
"Type",
"QlikType",
"Year",
"MonthPeriod",
"Month",
"Quarter",
"DocDate",
"CardName",
"Country",
"Territory",
"Region",
"Sales Employee" AS REDUCTION,
"Active Acct Mgr" ,
"Level 1 Reporting",
"Level 2 Reporting",
"Level 3 Reporting",
"ItemName",
"Quantity",
"OpenQty",
"Line Total GBP",
"Open Total GBP",
"Profit GBP",
"Discount Reason"
FROM [lib://Sales Analysis:DataFiles/QLIK_DataSource.qvd]
(qvd)

Where
"Level 1 Reporting" = 'CL' OR
"Level 1 Reporting" = 'IOL' OR
"Level 1 Reporting" = 'ACCESSORY'
;

Labels (2)
1 Solution

Accepted Solutions
indujanT
Contributor II
Contributor II
Author

Hello everyone,

I want to express my gratitude for your valuable time and assistance. It appears that the issue was related to case sensitivity. Upon implementing the UPPER() function, everything is now functioning perfectly. I have attached the final version of the code with sample column names below:

SECTION ACCESS;
Authorization:

LOAD * INLINE

[
ACCESS,              USER.EMAIL,                                 EMPLOYEE
ADMIN,                INDUJANT@qlik.co.uk,                       *
USER,                  JONG@qlik.co.uk,                    REECE HUGHES
USER,                  JONG@qlik.co.uk,                    CARLOS MAYORAL
USER,                  JOND@qlik.co.uk,                    SEBASTIAN KIC
USER,                  JONH@qlik.co.uk,                    REECE HUG
];

SECTION APPLICATION;

LOAD
...
UPPER("Sales Employee") AS EMPLOYEE,
.....
FROM [lib://Sales Analysis:DataFiles/QLIK_DataSource.qvd]
(qvd)

Thank you once again.

View solution in original post

5 Replies
BrunPierre
Partner - Master
Partner - Master

Hi, uncomment the "Section Access" statement.

indujanT
Contributor II
Contributor II
Author

Hi,

Thank you for your comment.

I have tried now but it's not working. the data loader considers '*' as actual data, and this causes it to not work properly.

Thanks.Screenshot 2023-08-09 090543.pngScreenshot 2023-08-09 090646.png

BrunPierre
Partner - Master
Partner - Master

Hi, To work around the problem of the * being misinterpreted as a wildcard, maybe is to do this

Replace("Sales Employee", '*', 'ALL') as REDUCTION

agigliotti
Partner - Champion
Partner - Champion

Hi @indujanT ,

SECTION ACCESS;
Autorization:
LOAD * INLINE
[
      ACCESS,             USER.EMAIL,                        Employee
      ADMIN,        admin@qlik.co.uk,            ALLVALUES
             USER,        user@qlik.co.uk,                 Mark Street

];

SECTION APPLICATION;

Star is  '|*|';

Reduction_Table:
load
Employee,
Employee as [Sales Employee]
resident Autorization where Employee <> 'ALLVALUES';
concatenate
load
Employee,
'|*|' as [Sales Employee]
resident Autorization where Employee = 'ALLVALUES';

 

Data_Table:
...
[Sales Employee]
FROM [lib://Sales Analysis:DataFiles/QLIK_DataSource.qvd]
(qvd);

I hope this can helps.

Best Regards

indujanT
Contributor II
Contributor II
Author

Hello everyone,

I want to express my gratitude for your valuable time and assistance. It appears that the issue was related to case sensitivity. Upon implementing the UPPER() function, everything is now functioning perfectly. I have attached the final version of the code with sample column names below:

SECTION ACCESS;
Authorization:

LOAD * INLINE

[
ACCESS,              USER.EMAIL,                                 EMPLOYEE
ADMIN,                INDUJANT@qlik.co.uk,                       *
USER,                  JONG@qlik.co.uk,                    REECE HUGHES
USER,                  JONG@qlik.co.uk,                    CARLOS MAYORAL
USER,                  JOND@qlik.co.uk,                    SEBASTIAN KIC
USER,                  JONH@qlik.co.uk,                    REECE HUG
];

SECTION APPLICATION;

LOAD
...
UPPER("Sales Employee") AS EMPLOYEE,
.....
FROM [lib://Sales Analysis:DataFiles/QLIK_DataSource.qvd]
(qvd)

Thank you once again.