Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
jjking58
Contributor III
Contributor III

Section Access

Is there a way to setup the section access to filter data from a file and also hide tabs for select users at the same time.

Example:

I have a two salesman that can only see thier sales data on tabs (A &B) and i have a manager that can see both salesman data on tabs(A &B) and additional company sales information on tabs (C & D).

CODE:

Section Access;

Security:

LOAD ACCESS,

    USERID,

    PASSWORD,

    SCCO,

    SCSLSM,

    SCLOC,

    Upper(SCCO&'|'&SCSLSM&'|'&SCLOC) as %AUTHID,

     SQL SELECT *

FROM [\\Data Library\Sales\SECURITY.qvd]

(qvd);

Section Application;

InvHeader:

LOAD IHINVN as InvoiceNumber,

    IHTYPP as DBCR,

    IHINYY,

    IHORNO,

    Date(Floor(Date#(IHIDAT, 'YYYYMMDD'))) as MasterDate,

    IHCUNO as Customer,

    NACOMP,

    CTNAME,

    IHINVN as Loc

    Upper(NACOMP&'|'&CTNAME&'|'& applymap ('InvDet',IHINVN,'nomatch')) as AuthID   

       

FROM [\\Data Library\Sales\SROISHB.qvd]

(qvd);

AuthBridgeTable:

Load Upper(NACOMP&'|'& CTNAME&'|'&Loc) as AuthID, Upper(NACOMP&'|'& CTNAME&'|'&Loc) as %AUTHID Resident InvHeader;

Load Upper(NACOMP&'|'& CTNAME&'|'&Loc) as AuthID, Upper(NACOMP&'|'&'<ANY>'&'|'&Loc) as %AUTHID Resident InvHeader;

Load Upper(NACOMP&'|'& CTNAME&'|'&Loc) as AuthID, Upper(NACOMP&'|'&'<ANY>'&'|'&'<ANY>') as %AUTHID Resident InvHeader;

Load Upper(NACOMP&'|'& CTNAME&'|'&Loc) as AuthID, Upper(NACOMP&'|'&CTNAME&'|'&'<ANY>') as %AUTHID Resident InvHeader;

Load Upper(NACOMP&'|'& CTNAME&'|'&Loc) as AuthID, Upper('<ANY>'&'|'& CTNAME&'|'&Loc) as %AUTHID Resident InvHeader;

Load Upper(NACOMP&'|'& CTNAME&'|'&Loc) as AuthID, Upper('<ANY>'&'|'& CTNAME&'|'&'<ANY>') as %AUTHID Resident InvHeader;

Load Upper(NACOMP&'|'& CTNAME&'|'&Loc) as AuthID, Upper('<ANY>'&'|'&'<ANY>'&'|'&Loc) as %AUTHID Resident InvHeader;

Load Upper(NACOMP&'|'& CTNAME&'|'&Loc) as AuthID, Upper('<ANY>'&'|'&'<ANY>'&'|'&'<ANY>') as %AUTHID Resident InvHeader;

Thanks in advance,

Jim 

Labels (1)
4 Replies
its_anandrjs
Champion III
Champion III

jjking58
Contributor III
Contributor III
Author

Thanks for the different examples, but how do i code file level security and object level security in the same document?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

That depends on how selective you want to be with your granting access to specific sheets. In theory, you create a sheet access table in Section Application and connect it to the same filter %AuthID that controls Data Reduction.

The Data Reduction for rows seems to be put in place already. Select a mechnism to manage Sheet-(& optionally object-)level access from the examples and attach it to your link field.

jjking58
Contributor III
Contributor III
Author

Thanks Anand & Peter

I took both suggestions and came up with the following which is working fine.

The code I originally posted stayed intact, but I added an additional field (SCTAB) to the table (Security) under the Section Access and populated with either a 1 or 2 for each user.

I then added the following under the Section Application

TabAccess:
LOAD * INLINE [
SCTAB, SH02, SH04, SH05, SH06, SH07
1, 1, 1, 1, 1, 1
2, 1, 1, 1, 0, 0
]
;

Finally I set a condition under Sheet Properties / General for each tab if (“Sheet ID=1,1,0)