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

Section Access Qlik Sense

Hi All, 

First Question: 

I`m trying to add to my application "Section Access". I want to show to the user info based on specific Model Name value that I set. 

so I added the below script: 

Section Access; 
LOAD * Inline [ 
ACCESS, USERID , Model Name
USER, A, 'Sony A1'
];


SECTION APPLICATION;

For some reason, this way is not working.

 

Second question :

 

I have another field which call "Region". I want to assign for each user the relevant region. 

I wrote the below script: 

Section Access; 
LOAD * Inline [ 
ACCESS, USERID , REGION
USER, A, EURO
];


SECTION APPLICATION;

When I defined the value EURO, the data that present to user A was only EURO - As expected! 

But when I changed instead of EURO to United State the user saw all the values  - Not as expected!

 

Thanks for helping 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
MK9885
Master II
Master II

First thing to check your field MODEL_NAME is Upper Case in your data model. If it is not then rename it to Upper(Model_Name) as MODEL_NAME
2nd would be your SA script as follows and you do not need an extra field 'PASSWORD' as the authentication is NTName based unlike QlikView
Star is *;
Section Access;
LOAD * Inline [
ACCESS, USERID , MODEL_NAME
USER, INTERNAL\sa_scheduler, *
USER, DOMAIN\A, Sony A1
];
SECTION APPLICATION;

3rd would be publish this app and see if it works...? if it says access denied, duplicate the app, right click, 'Open without data' to access SA script.
You'd need USER, INTERNAL\sa_scheduler, * as this would be your Qlik service account running the task in QMC. Maybe thats why it was not working?

View solution in original post

33 Replies
Or
MVP
MVP

For the first one, all fields used in Section Access should be UPPERCASE. You may also need to write in your value as Sony A1, rather than 'Sony A1' - it needs to match what is actually in the data, I believe (not sure what happens if you include the literal - it may work).

 

For the second one, I believe you need to have Strict Exclusion checked to make it so a user with no data can't actually access the system. 'United State' is presumably not a value ('United States' would be). Again, you don't need the string literals ('').

https://community.qlik.com/t5/QlikView-Documents/Section-Access-Strict-Exclusion/ta-p/1479908

 

Gysbert_Wassenaar

All field names in a section access table must be in UPPER case. That means you should use upper case Model Name to make it MODEL NAME. You'll also have to change the name of that field in the other tables in your data model.

With regards to your second question: Was user A the same user that reloaded the document (using the Data Load Editor) after changing EURO to United States? If you reload a document with section access then immediately after you will have access to all the data. If you close the document and reopen it then you'll see that section access will be applied.

talk is cheap, supply exceeds demand
kfir1987
Contributor II
Contributor II
Author

Hi, 

Regarding your answer to the second question, what is document  means? 

Gysbert_Wassenaar

By document I mean the Qlik Sense app.


talk is cheap, supply exceeds demand
kfir1987
Contributor II
Contributor II
Author

Hi

I  changed the column name to MODEL_NAME, but when I try to login to the application after publishing it I got the error "Access Denied". 

This is the code that I wrote: 

Section Access; 
LOAD * Inline [ 
ACCESS, USERID , MODEL_NAME
USER, A, Sony A1
];


SECTION APPLICATION;

Thanks 

 

timpoismans
Specialist
Specialist

Most likely because your USERID isn't A. Try it with your own USERID (Using OSUSER() in an app can help you to find out yours.)

To get access to your app right now, you'll have to load it without data (Right Click -> Load without data)
kfir1987
Contributor II
Contributor II
Author

Hi ,

No, this is not the reason ! I just replaced the original user with the letter A here for the example. But on my app the correct user defined.

So actually this is not the reason.
timpoismans
Specialist
Specialist

Is the value "Sony A1" present in data?

Could be you get access denied because the app can't show any data.

kfir1987
Contributor II
Contributor II
Author

Yes, The value "Sony A1" exist.