Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Adil-Haider
Contributor III
Contributor III

Section Access not working Propoerly

Hi All,

I am trying to run a simple section access code

SECTION Access;

LOAD * Inline [

USERID,PASSWORD,DEPT,ACCESS

JOHN,JOHN,FINANCE,ADMIN

ANN,ANN,IS,ADMIN

PETER,PETER,SALES,ADMIN,

BEN,BEN,TECH,USER

];

SECTION Application;

STAR is *;

LOAD * Inline [

DEPT,CostCenter

FINANCE,*

IS,5020

SALES,5030

TECH,5040

];

I have set document options flagging:

- Initial data reduction based on Section Access (with Strict Exclusion option)

- Admin Override Security

It gives the  attached output1.

However when i close the app and open it again it does not ask for any UserId and Password and gives output2.

The desired result is this

John may see data for all cost centres

Ann may only see data for cost centre 5020

Peter may only see data for cost centre 5030

Ben may only see data for cost centre 5040

but it does not seem to give this.

Regards

Adil Haider

Mob :

6 Replies
Or
MVP
MVP

Your section access/application works correctly as entered. You should be prompted for a username and password and the values should reduce correctly if you checked that box.

Did you actually run your script after entering it? Section access won't take hold until you run the script.

Adil-Haider
Contributor III
Contributor III
Author

Hi Shoham,

Thanks for your time and response!!

You have added the below code

Load * INLINE [

CostCenter, Value

5020, 100

5030, 200

5040, 300

5050, 400

];

before Section Access due to which it seems to be working. However if i comment this code and reload and open it with USERID - JOHN we are not getting any costcentre associated with FINANCE DEPT. Can you please help to understand this.

Regards

Adil Haider

Mob : +91 8886903338

Peter_Cammaert
Partner - Champion III
Partner - Champion III

It seems that Section Access is working very well, but you may have a problem in your data model. Why are you using wildcards in regular data columns? That technique is bad for performance and deprecated by Qlik.

Or
MVP
MVP

I've added this because otherwise, I would not have any data and Section Access/Application would not work at all (since they don't tie into any actual data). It's just a quick inline which should mimic your actual data if your data model is correct.

Keep in mind that if you want permissions to work correctly, you need to have at least one line in the data matching those permissions - if you do not have a single line matching "Finance", nobody is going to see "Finance".

Peter_Cammaert
Partner - Champion III
Partner - Champion III

I think the problem is more nuanced than this. There really is a single FINANCE line in the original script, so Data Reduction works as expected. But without your additional table, the wildcard fails to expand, even though there are three regular values in that same column.

See the example below, which does not contain a third table. You can still get in as USER with USERID+PASSWORD = BOB, and the DEPT=FINANCE line is still there (saving User BOB from being kicked out). But unfortunately, the wildcard character doesn't expand to any other CostCenter values...

It seems that Wildcard expansion in regular fields together with Data Reduction only works if the field with wildcards is also a key field linking to another instance of the same field. Dunno why this is...

Adil-Haider
Contributor III
Contributor III
Author

What does Total in the screenshot indicate?