Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am trying to set up SECTION ACCESS to restrict the access and each division can see only the related data.
The problem is that the data filtering doesn't work and I don't know why. I read all the forums but did not help.
Section Access;LOAD * INLINE [
ACCESS, USERID, PASSWORD, NTNAME, UPPER(DirectorateCode), UPPER(DirectorateDescription)
ADMIN, ADMIN, ADMIN, A\B, A, A
USER, USER1, U1, A\B, B, B
USER, USER2, U2, A\B, C, C
];Section Application;
and also I selected "Initial Data Reduction based on Section Access" and strict exclusion at the Document Properties / Opening tab.
Any idea why it is not working?
Hi
Many thanks for your replies, my fields were lower case then I had to put upper() when I was retrieving data from database
upper(DirectorateDescription) as DIRECTORATEDESCRIPTION
… sql exec QlikviewEventSummary;
try this,
Section Access;
LOAD * INLINE [
ACCESS, USERID, PASSWORD, NTNAME, UPPER(DirectorateCode), UPPER(DirectorateDescription)
ADMIN, ADMIN, ADMIN, A\B, A, A
USER, USER1, U1, A\B, B, B
USER, USER2, U2, A\B, C, C
];
Section Application;
Load * Inline [
UPPER(DirectorateCode), UPPER(DirectorateDescription)
A, A
B, B
C, C
];
Hi Azadeh, your field names should be:
Section Access;LOAD * INLINE [
ACCESS, USERID, PASSWORD, NTNAME, DIRECTORATECODE, DIRECTORATEDESCRIPTION
ADMIN, ADMIN, ADMIN, A\B, A, A
USER, USER1, U1, A\B, B, B
USER, USER2, U2, A\B, C, C
];Section Application;
And also in your script use upper case names.
Iif you want to assure your values are upper you can do a nested load:
Section Access;
LOAD ACCESS, USERID, PASSWORD, NTNAME, Upper(DIRECTORATECODE) as DIRECTORATECODE, Upper(DIRECTORATEDESCRIPTION) as DIRECTORATEDESCRIPTION;
LOAD * INLINE [
ACCESS, USERID, PASSWORD, NTNAME, DIRECTORATECODE, DIRECTORATEDESCRIPTION
ADMIN, ADMIN, ADMIN, A\B, A, A
USER, USER1, U1, A\B, B, B
USER, USER2, U2, A\B, C, C
];
HI,
Take a look at ExampleA code is below. Here USER1 will see all the fields except SALES
Section Access;
LOAD * INLINE [
ACCESS, USERID, PASSWORD, OMIT
ADMIN, ADMIN, ADMIN,
USER, USER1, U1, SALES
USER, USER2, U2, WAREHOUSE
USER, USER3, U3, EMPLOYEES
USER, USER4, U4, SALES
USER, USER4, U4, WAREHOUSE
USER, USER5, U5, *
];
Section Application;
LOAD * INLINE [
SALES, WAREHOUSE, EMPLOYEES, ORDERS
1, 2, 3, 4
];
Now look at Example B the code is below. USER1 here will only see the data for AFRICA.
Section Access;
LOAD * INLINE [
ACCESS, USERID, PASSWORD, REGION
ADMIN, ADMIN, ADMIN,
USER, USER1, U1, AFRICA
USER, USER2, U2, AMERICA
USER, USER3, U3, ASIA
USER, USER4, U4, EUROPE
USER, USER5, U4, AMERICA
USER, USER5, U5, *
];
Section Application;
SALES:
LOAD * INLINE [
REGION, PROFIT
AFRICA, 1000
AMERICA, 2000
ASIA, 3000
EUROPE, 4000
OCEANIA, 5000
];
Hi
Many thanks for your replies, my fields were lower case then I had to put upper() when I was retrieving data from database
upper(DirectorateDescription) as DIRECTORATEDESCRIPTION
… sql exec QlikviewEventSummary;