Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Morning All
Hopefully someone can help and highlight what I am doing wrong.
Attached is a very simple file using section access, and I am trying to set U1 (User 1) has admin rights and can see all and U2 (User 2) can only see part of the the data as a user.
However when I log in as U2 I get access denied (I am assuming it is because there are no matches as it allows access when strict Exclusion is unticked ?)
Log in as U1 to see script, and can anyone see what I have done wrong ?
I am sure it is something obvious but I am struggling to see it
Problem is in Capitalization (Upper Case) of the section access field. Try like:
SECTION Access;
LOAD * INLINE [
ACCESS, USERID, COMPANY_ID
ADMIN, U1, Comp1
ADMIN, U1, Comp2
ADMIN, U1, Comp3
ADMIN, U1, Comp7
USER, U2, COMP1
USER, U2, COMP2
];
SECTION Application;
Company_Data:
LOAD * INLINE [
COMPANY_ID, COMPANY_ NAME
COMP2, Company1
COMP2, Company2
Comp3, Company3
Comp7, Company7
];
Exit Script;
Note:
After user login QlikView will attempt to copy the selections in
fields in section access to any fields in section application with exactly the same field names (the field
names must be written in UPPER CASE)
Hence, ideally you should load your Section Application data using Upper() like:
SECTION Application;
Load
Upper(COMPANY_ID) as COMPANY_ID,
COMPANY_NAME;
Company_Data:
LOAD * INLINE [
COMPANY_ID, COMPANY_ NAME
Comp1, Company1
Comp2, Company2
Comp3, Company3
Comp7, Company7
];
Problem is in Capitalization (Upper Case) of the section access field. Try like:
SECTION Access;
LOAD * INLINE [
ACCESS, USERID, COMPANY_ID
ADMIN, U1, Comp1
ADMIN, U1, Comp2
ADMIN, U1, Comp3
ADMIN, U1, Comp7
USER, U2, COMP1
USER, U2, COMP2
];
SECTION Application;
Company_Data:
LOAD * INLINE [
COMPANY_ID, COMPANY_ NAME
COMP2, Company1
COMP2, Company2
Comp3, Company3
Comp7, Company7
];
Exit Script;
Note:
After user login QlikView will attempt to copy the selections in
fields in section access to any fields in section application with exactly the same field names (the field
names must be written in UPPER CASE)
Hence, ideally you should load your Section Application data using Upper() like:
SECTION Application;
Load
Upper(COMPANY_ID) as COMPANY_ID,
COMPANY_NAME;
Company_Data:
LOAD * INLINE [
COMPANY_ID, COMPANY_ NAME
Comp1, Company1
Comp2, Company2
Comp3, Company3
Comp7, Company7
];
Hi Derek,
Please see the attachment, this appliaction will help you to build Section Access concept. Below are the credentials to open the application.
Username: admin
Pass: admin
Thanks,
AS
see the attched file
take user ID as urs.....U1,U2
hope this helps
Thank you tresesco
Worked a treat - However slightly strange why it needs to be upper case - but it is what it is ..... working now
QV reads Section Access data as UPPER CASE, hence to match the same you have to convert the Application data as UPPER to match.