Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I'm trying ot restrict data to users based on the Area they belong to.
One user can belong to multiple areas. With below code, could I add multiple areas either in the security code or in a flat file that can be loaded to give users access to multiple areas.
In below example, User1 currently has access to Area1 and User 2 to Area2.
I'm looking for a way where User1 can have access to Area1 and Area3.
I don't think comma separated areas will work here.
Thanks very much.
ACCESS:
LOAD * Inline [
ACCESS,NTNAME,USER_GROUP, AREA
ADMIN,Domain\User1,QV_XOPS 16 COO_METRICS, Area1
ADMIN,Domain\User2,QV_XOPS 16 COO_METRICS, Area2
];
Section Access;
Load
ACCESS,
UPPER(NTNAME) AS NTNAME
RESIDENT ACCESS;
Section Application;
Hello,
You could add a second line for User1:
ACCESS:
LOAD * Inline [
ACCESS,NTNAME,USER_GROUP, AREA
ADMIN,Domain\User1,QV_XOPS 16 COO_METRICS, Area1
ADMIN,Domain\User1,QV_XOPS 16 COO_METRICS, Area3
ADMIN,Domain\User2,QV_XOPS 16 COO_METRICS, Area2
];
Hope this helps!
Hi
I would like to avoid adding extra lines for each user as the list can be very long.
I was trying to find a way where one line is added to each user and then multiple areas are added to this user on the same line either through a comma separate values or an excel spreadsheet.
I have faced that problem before... and always added an extra line to the access section. At the end of the day, what you get is a list much longer than desrired.
I manage it via Excel sheets. As far as I know, there is no other way to handle this. It would be a great improevement for next versions of Qlik if this feature was included.
Looking at the issue again, I guess the question here is whether we could have multiple values added to a given field/column when loading inline tables. This is not a security or section access issue I think.
If we could do this inline table in qlikview, I guess the section access can work automatically.
Why don't you use pipe as separator instead of comma?
load * inline [
field, field 2
a, one|two|three
b, four|five|six
];
You could use that pipe separated values field to filter your records with Section Access. Just make sure the data model is designed for that kind of values.