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

Help on Session Access

Hi All,

Breaking my head on this problem for last 24hrs I know this going to be very simple for the experts over here, cant make this work by myself.

I have a session access table as shown below.When user1 logs in to my application,user should see all the data for Country -->'india' and Region --> 'C'

When user 2 logs in to my application, user should see  Country --> 'AUS' and Region --> 'B'

I could make this work till here. problem starts here.

When user 3 logs in to application , user should see Country --> 'All Country' and Region -- > 'A'

To show all countries, i have uesd '*' in Country field,  but not getting the expected output.

Attaching the sample application with this post.

STAR IS *;

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, GROUP

    ADMIN, 1, 1, 1

    USER, 2, 2, 2

    USER, 3, 3, 3

];

Section Application;

LOAD * INLINE [

    GROUP, COUNTRY,REGION

    1,INDIA,C

    2,AUS,B

    3,*,A

];

LOAD * INLINE [

    COUNTRY, REGION, SALES

    INDIA, A, 1

    INDIA, B, 2

    INDIA, C, 3

    AUS, A, 4

    AUS, B, 5

    AUS, C, 6

    ENG, A, 7

    ENG, B, 8

    ENG, C, 9

];

- Sridhar

7 Replies
nagaiank
Specialist III
Specialist III

The interpretation of star (*) seems to be the problem.

If I replace the line

3,*,A

with

3,INDIA,A

3,AUS,A

3,ENG,A

it seems to work, I think.

I am sure you know what all I am stating below. But I will state it anyway just to explain my understanding or my thoughts.

In SECTION ACCESS, * means listed values, not ALL values.

In the SECTION APPLICATION part, * is a wild character to mean any number of characters e.g. in search string, and all fields in LOAD/SELECT statement. As a data value, I am not sure it means ALL data. If I am wrong, please correct me.

Not applicable
Author

Thanks for the quick response Krishnamoorthy. I`m aware of the logic which you have mentioned above to replace (*) with all countries.. i just gave an example of three countries, on my original application i have many countries and the level of fields the security to be implemented is also many. so it would be very difficult to replace (*) with all the values manually.

One more option would be extracting all the data from Country master table and joining that with section access table where ever I see (*). but this is also cumbersome, since i have many permutation combination like Country, Region, Territory, District and so on..

Hope i have explained my problem clearly, if not please let me know.

Any further help would be much appreciate

- Sridhar

Not applicable
Author

Any Help....!!!!!

Miguel_Angel_Baeyens

Hello Sridhar,

What about this instead?

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, COUNTRY, REGION

    ADMIN, 1, 1, INDIA, C

    USER, 2, 2, AUS, B

    USER, 3, 3, , A

];

Section Application;

LOAD * INLINE [

    COUNTRY, REGION, SALES

    INDIA, A, 1

    INDIA, B, 2

    INDIA, C, 3

    AUS, A, 4

    AUS, B, 5

    AUS, C, 6

    ENG, A, 7

    ENG, B, 8

    ENG, C, 9

];

Leave a blank instead of the * in the section access table. It may be more difficult to use both fields in that table instead the intermediate step of creating groups, but it may give a solution.

Are the users going to access via client to a server? Section access behaves different in either case.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Hi Miguel,

Thanks for your respone. I have tried this earlier. This behaves differently when i i give more access to the user3. i.e. now we have for user 3 Country --> 'All Country' and Region --> 'A'.

I modified the access for user 3 as Country --> 'All Country' and Region --> 'A' and

Country --> 'AUS' and Region --> 'All region' .

But with this access, when user 3 loggs in to the application, user 3 is able to see only Country--> 'AUS' and Region --> 'A' But i expecting him to see 'All Countries' with Region A and 'All region' in 'AUS'.

Attaching the application which i have tried with the above scenario.

Yes, usersare  going to access application via client to a server? Can you please tell me, how Section access behaves different in either case?

Thanks in advance Miguel.

- Sridhar

Miguel_Angel_Baeyens

Hi Sridhar,

In this case, you will have to loop all possible combinations. Using client means that, even when the user has given ACCESS as ADMIN, it will behave as USER instead. Besides, the blanks will not work in the server environment and you will need to use either a value or the "*" sign.

Reduction in section access doesn't more than one value per line, except for the "*", and in your example, AUS and A are excluding each other, or, at least, are not cumulative (that is what I understand you want to get for user 3, full access to region A (regardless the country) plus full access to country A (regardless the region).

You can do use two different reduction fields in section access and that will work if both fields are unrelated, and this is not the case. Again, to understand the data you are allowing one user to see, select the values in the fields corresponding to their reduction fields in section access, go to the File menu, Reduce Data, and click on Keep Possible Values.

What happens here? According on how your model is built, COUNTRY = 'AUS' and REGION = 'A' are incompatible (you cannot select both values in your model). Once you allow the user to see COUNTRY = 'AUS', three values in REGION (A, B and C) are available. In other words: you either see all regions and one country, or all countries and one region.

I think you need to create a more complicated model of groups since section access is not so flexible as to say "all values in country where region equals to 'A' but all regions where country equals to 'AUS'".

I'd love to hear from anyone that has faced this issue and see how they worked that around.

Hope that makes sense.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Thanks for your helpful answer Miguel. As suggested, i could able to manage this by taking all possible combination of values to my section access table.

- Sridhar.