Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Section Access not working with 2 fields

When I include 1 field in Section Access with * (to include all values), it works.  However, when I use 2 fields to select all values it doesn't work.

Here's my Excel Security data file with the 2 fields:    

ACCESSNTNAMESAUSERTABACCESS.SWANALYSIS    LocationModality
ADMINSHC\ROBYNRSHC\ROBYNR1            *    *
USERSHC\BOBBSHC\BOBB1            CCH    MR

Here's my SA Load Statement:

Section Application;
DocSecurity:
LOAD
   
SAUSER,
   
TABACCESS.ABOUT,
   
TABACCESS.SWANALYSIS,
   
Location  & '_' & Modality as  LOCMOD
FROM
AppConfig.xlsx
(
ooxml, embedded labels, table is DocumentSecurity);

NOTE that this works for user BOBB above where he can only see Location 'CCH' and Modality 'MR'.

However, it does not work for ADMIN ROBYNR to view all values of Location and all values of Modality.

NOTE that I need to combine the 2 fields into 1 named LOCMOD because the fields are in the same table.  When I kept them as 2 separate fields I would get a Synthetic Key.

Does anyone know how I can get ALL values for both Location and Modality?  Thanks in advance.

1 Solution

Accepted Solutions
maxgro
MVP
MVP

I did 2 .qvw, one with section access, the other without section access (nosec) using 2 fields; same model and data.

View solution in original post

6 Replies
maxgro
MVP
MVP

2 fields section access:

Basics for complex authorization

Anonymous
Not applicable
Author

I saw this post and I followed the instructions to create a new combined Authorization Key called LOCMOD which concatenates fields Location  & '_' & Modality

What am I missing?  It would be good to see a sample data model attached to the 'Basics for complex authorization'.

maxgro
MVP
MVP

I did 2 .qvw, one with section access, the other without section access (nosec) using 2 fields; same model and data.

Anonymous
Not applicable
Author

Can't get into the file?  What's the password?

Anonymous
Not applicable
Author

Just saw the UserID and Passwords in the NO SectionAccess file.  Will test out and see if it works.

Thank You!

Anonymous
Not applicable
Author

This is my final solution which worked:

STEP 1) In Section Application create concatenated new field

 
Section Access;
SATABLE:
LOAD
ACCESS
,
NTNAME
,
SAUSER
FROM
$(vSpreadsheetPath2)AppConfig.xlsx
(
ooxml, embedded labels, table is ShieldsFinanceSW_2fields);

Section Application;
DocSecurity:
LOAD
SAUSER,
TABACCESS.ABOUT,
TABACCESS.SWANALYSIS,
 
AccPacLocation & '|' & AccPacModality as %AuthID  // created new field 

FROM                  
$(vSpreadsheetPath2)AppConfig.xlsx
(
ooxml, embedded labels, table is ShieldsFinanceSW_2fields);

STEP 2) Create new field on the table that contains the concatenated fields

 

Accounts:
LOAD
Acct,
Dept,
ACCTID,
MID(ACCTID,3,4) as ACCT#,
Company,
Loc,
Mod,
Reg,
ExclCo,
AccPacModality,
AccPacLocation
AccPacLocation & '|' & AccPacModality as AuthID,  // created new field (note – different fieldname than in part 1 above)

 

STEP 3) Use the 2 new concatenated fields above to create a Bridge Table with 4 values.

 

    1. <ANY> represesnts all data.  Need to use 4 combinations for users who have access as:

      1. All Locations and All Modalities
      2. Specific Locations and All Modalities
      3. All Locations and Specific Modalities
      4. All Locations and All Modalities

  

// BRIDGE TABLE
Bridge:
Load AccPacLocation &'|'& AccPacModality  as AuthID,
AccPacLocation &'|'& AccPacModality  as %AuthID    //Create 1 combined field for Bridge table
        Resident Accounts ;
// CONCATENATE All combined combinations to Bridge table
Load AccPacLocation &'|'& AccPacModality  as AuthID,
AccPacLocation &'|'&'<ANY>' as %AuthID    //Create 1 combined field for Bridge table for ALL Modalities
        Resident Accounts ;
Load AccPacLocation &'|'& AccPacModality  as AuthID,
'<ANY>'&'|'&
AccPacModality   as %AuthID    //Create 1 combined field for Bridge table for ALL Locations
        Resident Accounts ;
Load AccPacLocation &'|'& AccPacModality  as AuthID,
'<ANY>'&'|'&'<ANY>'
as %AuthID    //Create 1 combined field for Bridge table for ALL Modalities and Locations
    Resident Accounts ;