Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data Filters based on user account

Hi all,

I've the following situation I need to solve and I hope you can give me an help.

In my document I've a bunch of data that are linked to an entitty called Distributor. This entity has an ID called distributor_id, which is linked to a dealer_id (different table) which is linked to a transactions table.

Each user who enters the panel can see data for each Distributor, can filters data by clicking on one of the Distributors from a list.

What i need to do now is to give access to each Distributor so that they can only see their data that is I wan to dynamically apply the same filter that is applied when someone clicks on an entry in the Distributor list.

I created  a domain account for each distributor so that they can access to the panel and I created a new table where i saved Domain Name and distributor_id but I don't know how to use this fact to filter the data

Also, I want that if an account which is not a Distributor access to the panel no filter is applied.

Do you have an Idea on how to do it?

thanks,

g

1 Solution

Accepted Solutions
Not applicable
Author

Hi all,

I want to share the solution I implemented which is quite enough what i need. As I said my data is grouped by dealers (dealer_id) which refer to Distributors (distributor_id) and my goal was to create an account for each distributor so that he could only see his data.

First I created a new document with an hidden script.

In the hidden script I saved all the Access info

I created on my server a new user for each distributor with a username and a password. I decided not to create domain users but only local ones as this was a requirement of my IT department.

I created a section  access table leaving empty the username and the password for each user so that once they access to the pannel and they click on the Document they do not have to insert twice the credentials:

  • ACCESS:USER or ADMIN according to privileges. I set only my personal account to ADMIN
  • USERID: *
  • PASSWORD: *
  • REDUCTION: this identifies the filte to be aplied.
  • NTNAME: the name of the local user created.

I created a table DistributorAccess for creating a link between the section access and my data, associating a distributor_id to each single user.

Out of all the users created there is only one who has access to all the data (ACCESS=ADMIN and REDUCTION=*) which is the same user used for the document reload: as i have a batch for auto-reloading data each hour i needed a local user for doing it. I realized that if i put only USERID and PASSWORD without NTNAME each time my reloading script run it was asked to insert a username and pwd for loading the data which means that i could reload only manually the data.

Using NTNAME with no USERID and PASSWORD gave me the possibility of setting up the scheduled job without any issue. Also, in this way, as said above, I could remove the double login request, the first for accessing the pannel and the second for accessing the document.

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, REDUCTION, NTNAME

    ADMIN, *,*,*,giovangabriele

    USER, *,*, 1,dist1

    USER, *,*, 2,dist2

    USER, *,*, 3,dist3

];

Section Application;

star is *;

DistributorAccess:

LOAD * INLINE [

   REDUCTION, distributor_id,

          1, 1

          2, 2

          3,3];

View solution in original post

8 Replies
Gysbert_Wassenaar

Sounds like section acces is what you're looking for. See here for an introduction pdf that can get you started.


talk is cheap, supply exceeds demand
Not applicable
Author

using section access you can achieve this

IAMDV
Luminary Alumni
Luminary Alumni

G,

As mentioned above you need Section Access with Field Reduction. And you need to use "Strict Exclusion" (Document Properties) to restrict the users. Please see this thread where I've provided an example.

Please read this thread for detailed information and example:

http://community.qlik.com/message/247356#247356

Thanks,

DV

www.QlikShare.com

jagan
Luminary Alumni
Luminary Alumni

Hi,

PFA file explains restrict of data based on the user. 

Admin User name : Admin (Admin user has full access)

Password : password

Sales User Name: Sales (Sales user has access to sales dept)

Password : password1

Market User Name: Sales (Market user has access to Marktet dept)

Password : password1

Hope attached file helps you.

Regards,

Jagan.

Not applicable
Author

hi,

first of all thank you for you support: the thread , the document link and the example provided helped me in doing part of the job.

What I'd like to know is if there is a way for doing it without a double login. Right now a user first logs-in to the qlikview panel and then, after selecting the document he has to put his username and pwd again. I'd like to avoid this second loginstep just filtering the data as the user clicks on the document.

Is this possible?

Also, is there an easy way for not showing the documents a domain user does not have a document CAL for ?

thanks,

g

Not applicable
Author

Hi all,

I want to share the solution I implemented which is quite enough what i need. As I said my data is grouped by dealers (dealer_id) which refer to Distributors (distributor_id) and my goal was to create an account for each distributor so that he could only see his data.

First I created a new document with an hidden script.

In the hidden script I saved all the Access info

I created on my server a new user for each distributor with a username and a password. I decided not to create domain users but only local ones as this was a requirement of my IT department.

I created a section  access table leaving empty the username and the password for each user so that once they access to the pannel and they click on the Document they do not have to insert twice the credentials:

  • ACCESS:USER or ADMIN according to privileges. I set only my personal account to ADMIN
  • USERID: *
  • PASSWORD: *
  • REDUCTION: this identifies the filte to be aplied.
  • NTNAME: the name of the local user created.

I created a table DistributorAccess for creating a link between the section access and my data, associating a distributor_id to each single user.

Out of all the users created there is only one who has access to all the data (ACCESS=ADMIN and REDUCTION=*) which is the same user used for the document reload: as i have a batch for auto-reloading data each hour i needed a local user for doing it. I realized that if i put only USERID and PASSWORD without NTNAME each time my reloading script run it was asked to insert a username and pwd for loading the data which means that i could reload only manually the data.

Using NTNAME with no USERID and PASSWORD gave me the possibility of setting up the scheduled job without any issue. Also, in this way, as said above, I could remove the double login request, the first for accessing the pannel and the second for accessing the document.

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, REDUCTION, NTNAME

    ADMIN, *,*,*,giovangabriele

    USER, *,*, 1,dist1

    USER, *,*, 2,dist2

    USER, *,*, 3,dist3

];

Section Application;

star is *;

DistributorAccess:

LOAD * INLINE [

   REDUCTION, distributor_id,

          1, 1

          2, 2

          3,3];

Not applicable
Author

@JaganMohan How do you sign out once you have signed in?

jagan
Luminary Alumni
Luminary Alumni

HI,

I never found a link for Sign out.  I think once you close the browser automatically it is signed out.

Regards,

Jagan.