Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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);
I figured what was wrong. I just needed to rename NTNAME as USERID. Spent so much time on this!
first of all you have to use UPPER function for both fields name and fields value in section access tables.
All my data is in upper case in the Excel file, apologies I didn't show it clearly in the example file
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.
I figured what was wrong. I just needed to rename NTNAME as USERID. Spent so much time on this!