Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
adiarnon
Creator III
Creator III

section access two fields

hi,

i have a problem-

im using section access but i need to use two fields-

some of my users need to see only some countries

and some of my users need to see only some companies.

there is no combination!

whats the best way to deal with this?

adi

7 Replies
jafari_ervin
Creator III
Creator III

Hi,

Use your section access with two reduction key. like below

Section Access;

Load ACCESS,

        NTNAME,

        Countries,

        Companies

from Excel.

Section Application;

Best,

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

The direction is correct, however the example will not work, unfortunately. Here is the list of steps:

1. Add 2 separate fields in Section Acces. Both fields and their values should appear in UPPER case.

2. Load the same fields SEPARATELY in two separate tables in Section Application and link them to the corresponding fields in your database (Country and Company). When the fields are linked separately, the security access is determined separately.

cheers,

Oleg Troyansky

www.masterssummit.com - take your QlikView skills to the next level!

adiarnon
Creator III
Creator III
Author

tnx oleg

in step 2-

now i have 2 field but they in one table

so i gues this is the resone why its not working...

can you explain me what should i do -

"Load the same fields SEPARATELY in two separate tables in Section Application "

how should i do that?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

In section application, after loading your data from different sources load some link tables like this:

SA_LINK_1:

LOAD UPPER(Country) AS COUNTRY, Country

RESIDENT WhateverTableContainsCountries;

SA_LINK_2:

LOAD UPPER(Company) AS COMPANY, Company

RESIDENT WhateverTableContainsCompanies;

Note that you may have to add additional logic if some users should be able to see all countries (*) or all companies, or everything from the two sets of dimension values.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Sahal
Creator II
Creator II

Hi,

This answer was simple and great UNTIL field values have null in them.

When i read about section access it uses AND and not OR in selections but how do i use OR with your simple(and great) answer?

This is my data:

section eeee.png

Your two link tables will work for user1 because there are values in both Company and Country field.

But for user3 you will not get access to Company because country is null.

Why is this? and how can we it be fixed?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Remember that even Section Access works with the standard QlikView associative logic; associations must be explicitly specified. NULL breaks all associations, so there won't be any links via the field that contains NULL, and your data model will probably be reduced to nothing.

The question you should ask yourself (knowing that NULL means 'nothing' and therefor QlikView works exactly as expected) is why is there a NULL value in an SA table? If this doesn't mean "nothing" but for example "any value is ok", then replace it by either an asterisk or a synthetic value like "ALL" and create the proper links in the Link tables between ALL and all link field values.