Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

Selector for Section Access Challenge

Hi guys,

I have a requirement to make 5 different security profiles in Section Access for Qlik Sense.

I have a table like this with a GroupId and ProductId :

GroupIdProductId
11
12
13
24
25
36
47
48
59
510

 

And I have 5 users with the following conditions :

UserIdGroupIdProductId
11all
225
33all
448
55all

 

As you see, some users have to see all the products of a GroupId, but some of them only can see a ProductId of a GroupId. How can I do it in qlik?

I've attached an excel table with the example

Best Regards, Marcel.

4 Replies
dplr-rn
Partner - Master III
Partner - Master III

not compltely clear on why you need the group at all in this case. i am assuming the case similar userid=2 is rare in your case. then it kind of makes sense

in any case i think Essentially you need to create UserID , ProductID table from above 2 tables and use that for section access.

 

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thanks @dplr-rn  for your quick answer.

The point here is that there are two types of users :

Type 1 : A user can see a whole group of products.

Type 2 : A user can see only a product of a group of products, or sometimes all the products of a group except some of them.

I was thinking about to explode all the combinations of GroupId and ProductId (when it says "all"), to check all the possible combinations.

Best regards, Marcel.

dplr-rn
Partner - Master III
Partner - Master III

yes. thats the way to go.

essentially you need all the UserID , ProductID table which will handle all the combinations.

avinashelite

Simple try like this 
SECTION Access;
LOAD 'ADMIN' as ACCESS,
UserId as USERID,
GroupId,
ProductId;
LOAD * Inline
[
UserId,GroupId,ProductId
1,1,all
2,2,5
3,3,all
4,4,8
5,5,all
];
SECTION Application;
DATA:
LOAD GroupId,
ProductId as ProductId_Master,
ProductId
FROM
[path\SectionAccesUsers.xlsx]
(ooxml, embedded labels, table is Hoja1);
Join(DATA)
LOAD GroupId,
ProductId as ProductId_Master,
'all' as ProductId
FROM
[path\SectionAccesUsers.xlsx]
(ooxml, embedded labels, table is Hoja1);