Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Section Access with SQL

I have created a section access like this :

Security:

load UPPER(UserCode) as USERID,

"USER" as ACCESS;

select * from G_USAGER;

load "ADMIN" as USERID

"ADMIN" as ACCESS;

section access;

load USERID, ACCESS

resident Security;

section application;

xxxx

xxx

I am only able to log in the application using the ADMIN User .

the others are rejected.

Any idea ?

Thanks a lot

Philippe

1 Solution

Accepted Solutions
Not applicable
Author

I tried UPPER(trim(ACCESS)) AS ACCESS , It works!

View solution in original post

7 Replies
johnan
Creator III
Creator III

Hi,

The section access must be in the top.

In my applications i have a INLINE with Admin rights:

Paste Your User rights here then

//AdminTable

JOIN LOAD * inline [

SERIAL,USERID,PASSWORD,ACCESS

SERIALNUMBER,,,ADMIN

*,USER,PASS,ADMIN];

The Serialnumber is good because i never have to sign in with User, Pass

Not applicable
Author

Hej Philippe

The times I have used section access for users, I had to included the domain name if using NT admin e.g. DOMAIN/Userid.

Do your user ids have the domain in front?

Not applicable
Author

Hi,

I have The Same Problem, is there a solution??

Not applicable
Author

UserTable:



SELECT user AS USERID ,psswd AS PASSWORD , access AS ACCESS

FROM dashboardUsers WITH(NOLOCK);Section Access

load ACCESS,USERID, PASSWORD ;





resident UserTable:







Section Application;



There are usernames and passwords on my dashboardUsers table. But only the user that named ADMIN works. Non Of the others are working

Not applicable
Author

I tried UPPER(trim(ACCESS)) AS ACCESS , It works!

jonathandienst
Partner - Champion III
Partner - Champion III

Phillipe

Maybe its just cut & paste problem, but I see no FROM statement for the

load "ADMIN" as USERID
"ADMIN" as ACCESS;

clause. Normally this causes the LOAD to use the next statement as the "from" source, but your next statement is the Section Access command, followed by the LOAD RESIDENT for the access load. I think QV might be getting confused at this point.

If that is the case

load "ADMIN" as USERID
"ADMIN" as ACCESS
FROM <where ever this data should be coming from>;

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
amars
Specialist
Specialist

Hi Philippe

Security:

load UPPER(UserCode) as USERID, "USER" as ACCESS;

select * from G_USAGER;

load "ADMIN" as USERID "ADMIN" as ACCESS;

For your code to work

ACCESS, USERID, PASSWORD



These fields needs to be in a single row. From ur code it seems that the ACCESS, USERID & I hope the password comes from a third table G_USAGER needs to be in a single row. Also for concatenating the ADMIN & USER level user's try Concatenate (Security) for ADMIN access. See the table structure as well(Ctrl+T)

Thanks.