Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've been unsuccessful in creating section access and sheet permissions. This is what I've gotten so far. Could someone please help?
Thanks,
Mindy
Section Access (example):
OSUser | Access |
---|---|
ORLANDO\disneyw | admin |
ORLANDO\mousem | user |
ORLANDO\duckd | user |
etc....... |
Sheet Permissions (example):
OSUser | SH_UserGuide | SH_Mgmt | SH_Acctg | SH_Parks | etc... |
---|---|---|---|---|---|
ORLANDO\disneyw | 1 | 1 | 1 | 1 | |
ORLANDO\mousem | 1 | 1 | 0 | 1 | |
ORLANDO\duckd | 1 | 0 | 0 | 1 | |
etc...... |
SECTION Access;
LOAD
OSUser,
Access
From
(ooxml, embedded labels, Table is SectionAccess);
SECTION Application;
SheetPermissions:
CROSSTABLE (SheetName, SheetAllowed, 1)
LOAD
OSUser,
UserGuide,
SH_Mgmt,
SH_Acctg,
SH_Parks
From
(ooxml, embedded labels, Table is SheetPermissions);
For the Sheet Properties [SH_Mgmt] General Conditional code...
= sum({SheetName={'SH_Mgmt'}, OSUser()}>} SheetAllowed) > 0
I also have the "Initial Data Reduction Based on Section Access" box selected along with the "Strict Exclusion" box.
I've got some weird results with the GetActiveSheetId part of the code..........
The sheet is not accessible; however, the sheet's tab is visible yet when you click on it it opens the next allowable sheet. Also, the SheetID statuses are all set as "Conditional: Normal".
=Only({<SheetName = {"$(=(subfield(GetActiveSheetId(),'\',2))"}, OSUser = {"$(=(OSUser()))"}>} SheetAllowed)
Even tried without SubField() and adding "Document\" to the sheet name.
=Only({<SheetName = {"$(=(GetActiveSheetId()))"}, OSUser = {"$(=(OSUser()))"}>} SheetAllowed)
When using the exact name of the sheet, the code works perfectly. Only the allowable sheets and their tabs are visible.
=Only({<SheetName = {SH_Acctg}, OSUser = {"$(=(OSUser()))"}>} SheetAllowed)
The section access is not needed for sheet permissions. Just use conditional show for sheets, like this (for SH_Mgmt sheet):
wildmatch(OSUser(),'*disneyw*','*mousem*')
How do I write the WildMatch code in way to not have to list each and every user?
It depends how you maintain the rules. I gave just the simplest example. You as well can use your approach with the SheetPermissions table as is. And, the condition for show will be exactly the same for each sheet:
=only({<SheetName={"$(=subfield(GetActiveSheetId(),'\',2))"}, OSUser={"$(=lower(OSUser()))"}>} SheetAllowed)
Just make sure to assign the correct IDs to the sheets.
I've got some weird results with the GetActiveSheetId part of the code..........
The sheet is not accessible; however, the sheet's tab is visible yet when you click on it it opens the next allowable sheet. Also, the SheetID statuses are all set as "Conditional: Normal".
=Only({<SheetName = {"$(=(subfield(GetActiveSheetId(),'\',2))"}, OSUser = {"$(=(OSUser()))"}>} SheetAllowed)
Even tried without SubField() and adding "Document\" to the sheet name.
=Only({<SheetName = {"$(=(GetActiveSheetId()))"}, OSUser = {"$(=(OSUser()))"}>} SheetAllowed)
When using the exact name of the sheet, the code works perfectly. Only the allowable sheets and their tabs are visible.
=Only({<SheetName = {SH_Acctg}, OSUser = {"$(=(OSUser()))"}>} SheetAllowed)
I see... The sheet is not hidden before user actually goes to the sheet and makes it Active. Well, that means that you have explicitly specify sheet in the conditions, as you just did
Ohhhh, I get it now. That explains QlikView's "confusion". Thanks a lot for your help.