Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Section acces script

This is my hidden script for section acces.

The user can only see the project with id 24

I want the admin to be able to see al projects, but now the admin can only see project nr 24.

What is wrong in my script?

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, PROJECT

    ADMIN, ADMIN, ADMIN, *

    USER, WOMMELGEM, 24, WOMMELGEM

];

Section Application;

LOAD * INLINE [

    project_id, PROJECT

    "24", WOMMELGEM

   

];

Tags (1)
1 Solution

Accepted Solutions
michael_maeuser
Contributor III

Re: Re: Re: Section acces script

check this one. hope that helps.

user: ADMIN,

pw: 1

11 Replies
joshabbott
Contributor III

Re: Section acces script

All the projects should be in your list, not just 24.  Maybe you could add the 'PROJECT' to the actual table and have it be only 'WOMMELGEM' for 24 or left join this table to your project table (or mapping table)

michael_maeuser
Contributor III

Re: Section acces script

like josh wrote, all projcts need to be listed if you set a wildcard.

so just load all projects from your fact.qvd or whatever and concatenate them.

s.th. like that

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, PROJECT

    ADMIN, ADMIN, ADMIN, *

    USER, WOMMELGEM, 24, WOMMELGEM

];

concatenate

load

PROJECT

from facts.qvd;

Section Application;

LOAD * INLINE [

    project_id, PROJECT

    "24", WOMMELGEM

  

];

tobias_klett
Contributor II

Re: Section acces script

Hi Katleen,
your USER has PASSWORD 24 instead of PROJECT 24.

The star " * " only knows the other entries of your list. Therefore you need at least one Entry for each Project. Otherwise the star only knows 24 because it is the only project which occurs in the field.

Hope this helps
Tobias

Not applicable

Re: Section acces script

I tried the script below, but he can't find the id..

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, id

    ADMIN, ADMIN, ADMIN, *

    USER, WOMMELGEM, 24, WOMMELGEM

];

Concatenate

LOAD id as project_id

FROM

[..\2. Extraction to QVD layer\QVD\projects.qvd]

(qvd);

Section Application;

LOAD * INLINE [

    project_id, id

    "24", WOMMELGEM

   

];

chauhans85
Esteemed Contributor

Re: Section acces script

document setting -> opening->Check  Intial data reduction based on section access and strict exclusion

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, PROJECT

    ADMIN, ADMIN, ADMIN, *

    USER, WOMMELGEM, 24, WOMMELGEM

];

concatenate

load

PROJECT

from facts.qvd;

Section Application;

LOAD * INLINE [

    project_id, PROJECT

    24, WOMMELGEM

 

];

Not applicable

Re: Section acces script

I checked the initial data reduction and strict exclusion already.

I tried the script below, but he can't find the id..

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, id

    ADMIN, ADMIN, ADMIN, *

    USER, WOMMELGEM, 24, WOMMELGEM

];

Concatenate

LOAD id as project_id

FROM

[..\2. Extraction to QVD layer\QVD\projects.qvd]

(qvd);

Section Application;

LOAD * INLINE [

    project_id, id

    "24", WOMMELGEM

  

];

chauhans85
Esteemed Contributor

Re: Section acces script

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, id

    ADMIN, ADMIN, ADMIN, *

    USER, WOMMELGEM, 24, WOMMELGEM

];

Concatenate

LOAD id as project_id,

id

FROM

[..\2. Extraction to QVD layer\QVD\projects.qvd]

(qvd);

Section Application;

LOAD * INLINE [

    project_id, id

    "24", WOMMELGEM

 

];

make sure id's values are in upper case

hope this helps

michael_maeuser
Contributor III

Re: Section acces script

there´s something strange, i guess. which field of your data you want to restrict? can you upload some sample data in an xls?

Not applicable

Re: Re: Section acces script

Sample qvd and qvw

The idea is that a certain user van only see the project with id = 24

and the admin can see all projects

Community Browser