Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
I have section acess table as below. The User A can acess data of "Product001 and Product002", and the User ADMIN can acess all.
My question is: Do I have to create a 10-rows table in order to acess Product001~010? OR If 100 products for one user to acess, a 100-rows table must be created, mustn't it ?
ACCESS USERID TEMPFIELD
Admin ADMIN
User A Product001
User A Product002
Hi, What you can do is, You can create Different Groups for Access. Like Group1 having Access To all Products, Group2 to a specific products & like that. Now for defining Section Access every time u need not write in an Inline Table but u can write a Query to specify Section Access as well.
e.g.
SectAccessTbl:
Load 'ADMIN' as ADMIN, 'A' as USERID, 'Group1' as GROUP, '*' as PRODUCTS autogenerate 1;
Concatenate (SectAccessTbl)
Load 'USER' as ADMIN, 'B' as USERID, 'Group2' as GROUP, PRODUCTS Resident ProductTable Where Product ='Product3' or Product = 'Product4;
Now u can write Section Access like
Section Access:
Load ADMIN, USERID, GROUP, PROUDCTS Resident SectAccessTbl;
Drop Table SectAccessTbl;
Like That.
Hi,
To answer your current question: Yes, you are right. because admin would only be able to access those products that are not in the list/table. so you have to mention all products in your table- INLINE or Excel.
Answer to your "Relative Amount" question: When you are having Month/Year in the dimension, you probably won't be able to achieve that at the front end only with Set analysis. you have to do it at the back end. you have to create a common date table/field with all dates in between your max and min dates. and then again your amount field would have to filled with '0' values where there is no input in original.
Regards, tresesco
Thank you?
I'm interesting in QV but not good at English. Thank you for your patient reply.
Hi, What you can do is, You can create Different Groups for Access. Like Group1 having Access To all Products, Group2 to a specific products & like that. Now for defining Section Access every time u need not write in an Inline Table but u can write a Query to specify Section Access as well.
e.g.
SectAccessTbl:
Load 'ADMIN' as ADMIN, 'A' as USERID, 'Group1' as GROUP, '*' as PRODUCTS autogenerate 1;
Concatenate (SectAccessTbl)
Load 'USER' as ADMIN, 'B' as USERID, 'Group2' as GROUP, PRODUCTS Resident ProductTable Where Product ='Product3' or Product = 'Product4;
Now u can write Section Access like
Section Access:
Load ADMIN, USERID, GROUP, PROUDCTS Resident SectAccessTbl;
Drop Table SectAccessTbl;
Like That.
Dear all,
comments on Groups is correct, n'theless Using the "STAR IS" -command forces in the section access to interprete e.g. the "*" to read all, thus script might look as fllws:
STAR IS *;
Access: LOAD * INLINE[ACCESS, USERID, TEMPFIELD,
Admin, ADMIN, *
User, A, Product001
User, A, Product002];
HTH
Peter
Hi, I know your idea a little. But when I copy your code to QV script editor, QV report an error like the pic. I think it's because of my ignorance about script code. Could you please help me correct the error?
ProductTable:
LOAD * INLINE [
PRODUCTS
Product3
Product 4
Product1
];
SectAccessTbl:
Load 'ADMIN' as ADMIN, 'A' as USERID, 'Group1' as GROUP, '*' as PRODUCTS autogenerate 1;
Concatenate (SectAccessTbl)
Load 'USER' as ADMIN, 'B' as USERID, 'Group2' as GROUP, PRODUCTS Resident ProductTable Where Product ='Product3' or Product = 'Product4;
Make sure the fields are named exactly the same. Capital and lowercase letter matter so it should be
Load 'USER' as ADMIN, 'B' as USERID, 'Group2' as GROUP, PRODUCTS Resident ProductTable Where PRODUCTS ='Product3' or PRODUCTS = 'Product4;
I would stay with amars idea although the ideal solution is to have a permissions table in a database that defines the groups instead of creating the groups in QlikView.
The '*' or '' works alright in the developer, but when you have strict exclusion enabled or you open the file in the server environment, it doesn't work as well. However, since I didn't know about the "STAR is;" function, Peter might know something I don't.
Regards.
Thank you, Karl, Peter, amars and tresesco.