Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Section Access and Sheet Permissions

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):

OSUserAccess
ORLANDO\disneywadmin
ORLANDO\mousemuser
ORLANDO\duckduser
etc.......

Sheet Permissions (example):

OSUserSH_UserGuideSH_MgmtSH_AcctgSH_Parksetc...
ORLANDO\disneyw1111
ORLANDO\mousem1101
ORLANDO\duckd1001
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.

1 Solution

Accepted Solutions
Not applicable
Author

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)

View solution in original post

6 Replies
Anonymous
Not applicable
Author

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*')

Not applicable
Author

How do I write the WildMatch code in way to not have to list each and every user?

Anonymous
Not applicable
Author

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.

Not applicable
Author

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)

Anonymous
Not applicable
Author

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

Not applicable
Author

Ohhhh, I get it now.  That explains QlikView's "confusion".  Thanks a lot for your help.