Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 :
GroupId | ProductId |
1 | 1 |
1 | 2 |
1 | 3 |
2 | 4 |
2 | 5 |
3 | 6 |
4 | 7 |
4 | 8 |
5 | 9 |
5 | 10 |
And I have 5 users with the following conditions :
UserId | GroupId | ProductId |
1 | 1 | all |
2 | 2 | 5 |
3 | 3 | all |
4 | 4 | 8 |
5 | 5 | all |
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.
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.
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.
yes. thats the way to go.
essentially you need all the UserID , ProductID table which will handle all the combinations.
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);