Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When defining field values in Section Access, is it possible to use partial string matches?
For example, one user should only be able to see regions beginning with 'S', while another user should only be able to see regions beginning with 'NW'. I would like to write something like the following, but it does not work:
LOAD * INLINE [
ACCESS, NTNAME, REGIONSECURITY
USER,user1,'R*'
USER,user2,'NW*']
Hi,
It will work make sure whether you have checked the option .
Document Properties-->Opening-->Strict data reduction based on section access to be enabled with strict exclusion.
Fieldname of the region should also be REGIONSECURITY i mean the field in application section.
Celambarasan
I have just created a quick example and it does not seem to be working. Please see my script:
SECTION Access;
LOAD * Inline [
ACCESS, USERID, REGIONSECURITY
ADMIN, admin,
USER, user1, 'S*'
USER, user2, 'NW*'
];
SECTION Application;
Locations:
LOAD * Inline [
REGIONSECURITY, Location
S1, South 1
S2, South 2
NW1, North West 1
NW2, North West 2];
If you open the app as "admin", you see everything. If you try to open as "user1" or "user2", if gives the "Access denied to this QlikView document" message.
You could create a table that links your section access and Locations tables. Something like this:
SECTION Access;
LOAD * Inline [
ACCESS, USERID, REGIONSECURITY
ADMIN, admin,
USER, user1, user1
USER, user2, user2
];
SECTION Application;
Locations:
LOAD * Inline [
LocationKey, Location
S1, South 1
S2, South 2
NW1, North West 1
NW2, North West 2];
LocationWildcard:
LOAD
'user1' as REGIONSECURITY,
LocationKey
RESIDENT Locations
WHERE LocationKey like 'S*'
;
etc.
Thanks Gary. That looks like a solution that could work.