Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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)
33 Replies
MK9885
Master II
Master II

Is it working now?
If yes, then mark the answer as correct and you can close this topic.
Thanks.
kfir1987
Contributor II
Contributor II
Author

unfortunately, no.
MK9885
Master II
Master II

What is the name you trying to restrict in Fact or Dim table?
Also please post your Section Access script as is.
kfir1987
Contributor II
Contributor II
Author

The name that I want to restrict is Sony A1

The Section Access script is :

 

Star is *;
Section Access; 
LOAD * Inline [ 
ACCESS, USERID ,PASSWORD, MODEL_NAME
USER, DOMAIN\A, DOMAIN\A, Sony A1
];


SECTION APPLICATION;
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?
timpoismans
Specialist
Specialist

Try omitting the password field and value and try again.

kfir1987
Contributor II
Contributor II
Author

Hi,
1. Yes, the column in the data model defined with upper case.
2. The script didn`t work.
3. now my script looks like this (still not working):
Star is *;
Section Access;
LOAD * Inline [
ACCESS, USERID , MODEL_NAME
USER, INTERNAL\sa_scheduler, *
USER, DOMAAIN\A, Sony A1
];


SECTION APPLICATION;
kfir1987
Contributor II
Contributor II
Author

Hi 
I did it and still not working. 

timpoismans
Specialist
Specialist

I've made a test version on my company's server with the following code:

Section Access;

[Section Access]:
Load * Inline [
	ACCESS, USERID, DIVISION
    USER, DOMAIN\user,TAX
    USER, DOMAIN\user,LEGAL
    USER, DOMAIN\user,FAVA
];

Section Application;
Test:
Load * Inline [
DIVISION, Test
    LEGAL, 1
    BUSINESS CONTROLLING, 2
    CONSULTANTS, 3
    BEDRIJFSREVISOREN, 4
    ACCOUNTANTS, 5
    CORPORATE FINANCE, 6
    TAX, 7
    FAVA, 8
];

This is working perfectly.

 

Perhaps try to compare this test script to yours.

kfir1987
Contributor II
Contributor II
Author

I distinguish now when the values (not the dimension name) appear with an upper case the restriction works. But when the value with lower cases the restriction is not working.