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

Specify values to exclude in Section Access

Is it possible to define values in a field to exclude for specific users in Section Access?

For instance, an organisation may have 500 products and they want users to see all of them except 5.  Instead of specifying 495 products a user does have access to, can you specify the 5 that should be excluded?

4 Replies
MVP
MVP

Re: Specify values to exclude in Section Access

Hi,

You can do this by arriving a additional Field like ProductCategory which has two values like 'Show', 'Hide' in the Products table.  All the 495 products should have 'Show' value and the remaining 5 Products should have 'Hide'.

You can use similar script like this

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, REDUCTION

    ADMIN, Admin, password, *

    USER, Sales, password1, 1   

];

Section Application;

star is *;

Departments:

LOAD * INLINE [

   REDUCTION, ProductCategory

    1, Show

    2, Hide];

Sales:

LOAD

     *,

     If(Match(Product, 'Product1', 'Product2', 'Product3','Product4','Product5'), 'Hide', 'Show') AS ProductCategory //Product 1-5 are products to hide from users

FROM DataSource;

Finally, you should select Settings -> Document Properties -> Opening tab -> select  "Initial Data Reduction based on Section Access"

Hope this helps you.

Regards,

Jagan.

Not applicable

Re: Specify values to exclude in Section Access

Thanks for the reply Jagan.

This would work, but it is not as elegant as it could be with an "exclude" or "not in" style function.

MVP
MVP

Specify values to exclude in Section Access

Hi,

You can try Exclude(Exists()) or Not In would exclude the data from the Qlikview file.  Is it ok for you.  But the above solution will keep the data in Qlikview file and show/hides the data based on the logged in user.

Regards,

Jagan.

Not applicable

Specify values to exclude in Section Access

The first option is preferable.  There would be users who need to view all data.

Community Browser