Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a section access requirement like this
If ACCESS = Admin, then grant full access to NTNAME ( access to all Levels- Level 1, Level 2, Level 3, Level 4)
If ACCESS = USER, then grant access to NTNAME as per Level 4 (make sure it has some value)
If Level 4 is empty then then grant access to NTNAME as per Level 3 (make sure it has some value)
If Level 4 & Level 3 are empty then then grant access to NTNAME as per Level 2 (make sure it has some value)
If Level 4 & Level 3 & Level 2 are empty then then grant access to NTNAME as per Level 1
My data is a single excel sheet and each level has some distinct values (say 200). How to handle this ?
Thanks,
Divya
No idea what these Levels represent or how they are used in your data model. Maybe you can attempt a solution like specified below. If no, please provide more details about your document or upload a representative sample qvw.
Best,
Peter
Hi Peter,
Level hierarchies starting from Level 1 down to Level 4. We can visualize these levels as below, meaning if there is no Level 1 (Country) there cannot be other Levels (Region, State, City)
Level 1 | Country |
Level 2 | Region |
Level 3 | State |
Level 4 | City |
As with everything in QlikView and due to the explicit-value-linking-associative logic of QlikView, you cannot select *nothing* (i.e. NULL) in the User Interface. Nor can you connect SA permissions to *nothing*. If you subsequently reduce your document, all those values will get thrown out anyway.
Replace them with some default value, like 'missing' or 'unknown'. If you don't like those values to appear in your listboxes and other objects, create Level X field copies in which you replace *nothing* with the selected default string value. Then create the concatenated Level X path from those values.
Sounds like the 4 Levels are part of a hierarchy in a tree structure. You could add a field where you calculate the number of childs for each item, and than grant access to items with 0 childs only, the leaf level items.
Am posting a sample data of my requirement.
there are two excel sheets.
one is Data - Data.xlsx - contains users data
other one is Section Access file - Section Access Data.xlsx - this tells which user should access what.
ACCESS | NTName | Level 1 (Country) | Level 2 ( Region) | Level 3 ( State) | Level 4 (City) |
ADMIN | A | ||||
ADMIN | B | ||||
USER | C | Atlanta | |||
USER | D | Rajasthan | |||
USER | E | Patna | |||
USER | F | North | |||
USER | G | Japan | |||
USER | H | Kyushu |
Consider the above table.
If ADMIN - Grant full access to all Country, Region, State, City
If USER check for below scenarios
Thanks,
Divya
Still, an important distintion is left undefined.
If both City and State is null, then Check for Region, if he has an entry in Region, then grant access to that Region. USER F must see only North Region Data
Should USER F have access to all North reqions in all countires? If Yes, then there are 16 possible connections for every facts record. If No, then there are only 4.
No he should see only North region data of his Country, which is Japan
So all lower levels are always specified (although they are not in your example). For example, to which country does Atlanta belong to according to your Section Access data? Also Japan? Because that's the only country available in your Excel data source...
If you expand your Section Access Data.xlsx source file to include values for all lower levels, then we create 5 mapping records for each row in Data.xlsx (Number of Level columns+1). For row 10 this set becomes (assuming imaginary wildcards for all missing level values):
1= /Japan/North/Hokkaido/Otaru
2= /Japan/North/Hokkaido
3= /Japan/North
4= /Japan
5= /
Since USER F will have a corrected SA specification of
/Japan/North
we are able to connect USER F to row 3 of your mapping data. USER A qnd USER B will be linked to mapping data row 5 and they will see this Data row as well. The others won't because there is no match.
NOTE: as I already stated before, you will have to merge all Level values into a single consistent Level Patch field for this mechanism to work. Of course, you are free to leave the original Level X fields as they are.