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

In your original table do you have similar name for the field you trying to restrict, MODEL_NAME?

Fact: Load *,
Upper (Model_name) as MODEL_NAME
From...

And in the end for the script
Star is *;
Section Access;
LOAD * Inline [
ACCESS, USERID , MODEL_NAME
USER,INTERNAL\sa_scheduler,*
USER, ABCNET\A, Sony A1
];
SECTION APPLICATION;
kfir1987
Contributor II
Contributor II
Author

Yes of course! My data contain 4 columns: ID, SC, MODEL_NAME, REGION .

I wrote your script, but still not working 😞
timpoismans
Specialist
Specialist

When defining the users in section access, do you include the domain name?

When using the function OSUser() in the front-end of the application, it gives you two values:

  • UserDirectory = Domain
  • UserId = ID

In your section access table, users should be defined as DOMAIN\ID

 

kfir1987
Contributor II
Contributor II
Author

Yes, on the section access I defined also the domain name. That's mean instead of user A I have actually DOMAIN_NAME/A
timpoismans
Specialist
Specialist

And have you checked if both DOMAIN and UserId are correct through the OSUser() function?

 

If you've created your section access table correctly, included the Section Access; | Section Application; and have named the reduction field correctly (as in all upper), the only thing that comes to mind are the values in your tables.

 

kfir1987
Contributor II
Contributor II
Author

yes, I check it via OSUser function . 

Both of them are the same  ( Domain and UserID)

 

timpoismans
Specialist
Specialist

And how do you enter the value into your section access table?

  • 'Sony A1'
  • Sony A1

 

The second option should be used.


If you are 100% that your ID is correct, the name of your reduction field and its value are correct and the reduction field is present in your data model alongside the value, I'm not sure what could still be wrong.

 

MK9885
Master II
Master II

BTW,  to test section access you'd have to publish the app.

Just reloading the app as a developer w/o publishing would not implement section access.

Add yourself to the SA script and test it if you could or ask any user to test once it is published

kfir1987
Contributor II
Contributor II
Author

Hi,

Yes, Im using the second option .
Thanks a lot for your help.
kfir1987
Contributor II
Contributor II
Author

Yes I published it on a stream.