Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
matthewp
Creator III
Creator III

Section Access not working for field types

I cant get my section access to limit what a user can see within my qv document.

Excel file : section_access.xlsm

Tab name: SA

Data:

    

User/AdminNameNT logonfieldtype
ADMINSVC_QVserver\svc_qv<ALL>
ADMINJohn Doeserver\abc1<ALL>
USERAlan Smithserver\cde2002
ADMINAdministratorserver\administrator<ALL>
USERPaul Pottsserver\fgh3<ALL>

SECTION ACCESS SCRIPT:

SECTION Access;

trace <<< Section Access >>> ;

LOAD [User/Admin] as [ACCESS],

     [NT logon] as [NTNAME],

     [fieldtype] as [Field Type]

    

FROM

[Resources\section_access.xlsm]

(ooxml, embedded labels, table is SA)

;

trace <<< Section Application >>> ;

SECTION Application;

FIELD SCRIPT:

field:

LOAD [f ID],

     [f Type] AS [Field Type],

     [f Name] AS [Field Name]

FROM

$(vDetailsQVDDirectory)FIELD_LOAD.qvd

(qvd);

6 Replies
Chanty4u
MVP
MVP

try with UPPER()

SECTION Access;

trace <<< Section Access >>> ;

LOAD [User/Admin] as [ACCESS],

    UPPER( [NT logon]) as [NTNAME],

     UPPER([fieldtype] )as [Field Type]

   

FROM

[Resources\section_access.xlsm]

(ooxml, embedded labels, table is SA)

;

trace <<< Section Application >>> ;

SECTION Application;

FIELD SCRIPT:

field:

LOAD [f ID],

    UPPER( [f Type])  AS [Field Type],

     UPPER[f Name] ) AS [Field Name]

FROM

$(vDetailsQVDDirectory)FIELD_LOAD.qvd

(qvd);

matthewp
Creator III
Creator III
Author

Still the same after reload, [Field Type] is a number if that makes any difference?

jonathandienst
Partner - Champion III
Partner - Champion III

I am assuming that <ALL> means all items rather than a specific value of <ALL> in your fact table. You will need a generic key approach here. This article will help you   Generic keys

Also the fields used in section access should all be in upper case, so you might need to rename [Field Type] to [FIELD TYPE]

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
matthewp
Creator III
Creator III
Author

Changed the Aliases to upper case and still the same

Anil_Babu_Samineni

I Tried same thing. It's working perfect

    

ACCESSNTNAMESECURED_COMPANYPASSWORD
ADMINABCALL
ADMINDEFA;B;C
ADMINGHIA;D;F
USERJKL*
ADMINMNOALL
USERPQRALL

Then Try Something like

Security:

NoConcatenate

LOAD ACCESS,

     NTNAME,

     SECURED_COMPANY,

     PASSWORD

FROM

Path

(ooxml, embedded labels, table is Sheet1);

Try this

User/AdminNameNT logonfieldtype
ADMINSVC_QVserver\svc_qvALL
ADMINJohn Doeserver\abc1ALL
USERAlan Smithserver\cde2002
ADMINAdministratorserver\administratorALL
USERPaul Pottsserver\fgh3ALL
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
stigchel
Partner - Master
Partner - Master

Have you checked the initial data reduction based on section access? It is in menu Settings\Document properties the opening tab