Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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'
;
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.
Hi, uncomment the "Section Access" statement.
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.
Hi, To work around the problem of the * being misinterpreted as a wildcard, maybe is to do this
Replace("Sales Employee", '*', 'ALL') as REDUCTION
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
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.