Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Sense Data reduction with Hierarchical Section Access

I want to provide user access based on their reporting hierarchy. So if Parent 1 has access to node 2,4,6 those are the only records they can see. I have created the user Hierarchy as shown on Sheet 1 in attached file and Access information is available in Organization worksheet. Following is the code I have so far but this shows all the information.

TempTree:

HierarchyBelongsTo(NodeID,ParentID,Employee,TreeID,TreeName)

Load

    NodeID,

    ParentID,

    UPPER(Employee) as Employee

FROM [lib://QVD Folder/Employee_Hierarchy.xlsx]

(ooxml, embedded labels, table is Sheet1);

//  Trees:

// Load *,

//      Upper(NodeID) as REDUCTION

//      Resident TempTree;

// Drop Table TempTree;

Section Access;

Auth:

LOAD

    "ACCESS",

    NTNAME,

  //  Username,

    NodeID as REDUCTION

FROM [lib://QVD Folder/Employee_Hierarchy.xlsx]

(ooxml, embedded labels, table is Organization);

Section Application;

Link2:

Mapping

Load

    ParentID as REDUCTION,

    Employee

FROM [lib://QVD Folder/Employee_Hierarchy.xlsx]

(ooxml, embedded labels, table is Sheet1);

1 Solution

Accepted Solutions
Not applicable

Re: Sense Data reduction with Hierarchical Section Access

I figured what was wrong. I just needed to rename NTNAME as USERID. Spent so much time on this!

4 Replies
agigliotti
Honored Contributor II

Re: Sense Data reduction with Hierarchical Section Access

first of all you have to use UPPER function for both fields name and fields value in section access tables.

Not applicable

Re: Sense Data reduction with Hierarchical Section Access

All my data is in upper case in the Excel file, apologies I didn't show it clearly in the example file

agigliotti
Honored Contributor II

Re: Sense Data reduction with Hierarchical Section Access

I think you are missing to create a table to be used for data reduction in section application based on ParentID field value.

your Link2 table is not a resident table but only a mapping table.

Not applicable

Re: Sense Data reduction with Hierarchical Section Access

I figured what was wrong. I just needed to rename NTNAME as USERID. Spent so much time on this!