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: 
MK9885
Master II
Master II

Security restrictions based on Data Base

Hi,

I'd like to add section access through Data base.

Section Access;

USERADMIN:

LOAD

     

     (Field1),

     Field2,

     Field3,

     Field4,

    UPPER( Field5) as CODE,

     Field6   

   

FROM

...\USERADMIN_ROLE.QVD (qvd);



SQL SELECT

   "Field1",

    Field2,

    "Field3",

    "Field4",

  UPPER(  "Field5") as CODE,

    Field6,

    "Field7",

    "Field8"

   

FROM

  .........";

Section Application;

I want to restrict user based upon CODE and Field5 in SQL DB.

So if a user has a CODE=500, he should only see data related to 500 and all other fields should not appear to him.

I'm loading the USERADMIN table from a qvd and using it in Section Access and I'm using SQL querry as well.

I also want to load a Inline table as I want to add a single user as an Admin, which I cannot do in Data Base. All other users are available in Data base with a particular Code to them.

I tried loading in many different ways and changing the querry in qlik but still doesn't work.

So with a qvd, Inline & SQL, how can I apply section access?

Please tell me what wrong I'm doing here?

stalwar1swuehlloveisfail

Thanks.

12 Replies
MK9885
Master II
Master II
Author

Thanks Peter for clearing.

But when I follow what you've said I'm getting an Error942: Table or view not found in Oracle.

I have access to that schema and can view the scheme and browse it as well.

And yes, I want to restrict user based upon CODEID which are assigned to users

EX:

USER CODEID

1        1

2         2

3          1

4          1

......

So if a user with CODEID 1 logins, he should only view his data. The same CODEID field is in data model. But I'm loading this CODEID from a qvd and not added into Data Model.

Only running this QVD in source qvw & also section access in source file.

I did understand what you told in very first reply and concatenated as well but I was getting this Error message. So I thought it's not working.

MK9885
Master II
Master II
Author

I tired but I get Error 924 Oracle table not found.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Your error points to an Oracle table load malfunctioning, not to Section Access.

Try by removing or commenting out the Section Access; statement. You will still get the Oracle error, but there will be no mistake as to who is causing problems. The quickest way to get a correct SQL SELECT for an Oracle table in that particular database is to use the Select... button in Script Editor, and let the Wizard assemble the correct SELECT statement for you. Enable the Preceding Load option if you don't feel like renaming your columns in SQL. You can now rename the fields in the preceding load which is a regular QlikView load. Add the CONCATENATE prefix to the preceding load instead of the SQL Select and you should be on your way.

If this eliminates the error, and produces the expected data, then you can uncomment the Section Access; statement.

Best,

Peter