Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Section Access: Combine 'Data reduction' and 'Initial Selection'

Hi all,

In a QlikView document I am succesfully applying Section Access (although it is applied via an excel file, for simplification I show it as an Load Inline Table here):

Section Access;

Load * Inline [

NTNAME, ACCESS, REDUCTIONFIELD

Admin, Admin, *

USER_A1, User, A

User_B1, User, B,

User_B1, User, B

];

Section Application;

However I would also like to make an automatic selection after a user had logged in. Preferably based on a different field (let's call it 'SELECTIONFIELD'). However for this field no data reduction - the user must be able to manually make a different selection in the samen field.

Eg.: When User_B1 does a login, the data is reduced according to 'B'. After the dashbaord has been opened, it also shows an active selection on 'SELECTIONFIELD' (SelectB1). If User_B2 opens the dashboard, the same reduction is applied (according to 'B') however his active selection is 'SelectB2'.

Can this be done?

Koen

6 Replies
giakoum
Partner - Master II
Partner - Master II

2 ways:

- either you write a complex OnOpen trigger (not convenient if you have many users

- or you set a table with user and SelectB2 fields, and then use this table as set analysis in your expressions or as an OnOpen trigger as option 1

Not applicable
Author

Hi Ioannis,

Option 2 looks like an interesting path to follow. However I am not yet

there.

I created the following table:

Groups_Selection:

LOAD USER,

Group

FROM

(ooxml, embedded labels, table is Section_Application)

;

With e.g. USER = User_B1; Group = SelectB1, USER = USER_B2, Group =

SelectB2.

I create an OnOpen Trigger with command:

Select in Field: Field x ; Value = Group

However this does not have any effect. no selections are made.

Regards,

Koen

On Mon, Jul 13, 2015 at 2:54 PM, ioannis giakoumakis <

giakoum
Partner - Master II
Partner - Master II

no selections are made even when using the desktop client?

Not applicable
Author

Hi Ioannis,

No selection is made:

13-7-2015 4-24-03 PM.jpg

Not applicable
Author

Hi Ioannis (and other),

Maybe I wasn't clear enough. However, your answer did indicate in the right direction, so I'll like it:).

The total solution was:

Include the field in the Section Application part; so

Section Access;

Load * Inline [

NTNAME, ACCESS, REDUCTIONFIELD, SELECTIONFIELD

Admin, Admin, *, *

USER_A1, User, A, *

User_B1, User, B, B1

User_B2, User, B, B2

];

//Load * Inline can be an excel or qvd table as well.

Section Application;

However 'SELECTIONFIELD' should not exist in the original data (or data will be reduced via row filters).

You can then add on the row below Section Application an extra table with

//Load * Inline can be an excel or qvd table as well. Be sure to load distinct.

Load * Inline [

SELECTIONFIELD

B1,

B2

];

This field is reduced to one value - which you then can use as trigger field to make a selection (e.g. OnOpen)

Not applicable
Author

To add: it does not work in combination with 'Strict Exclusion', leave only 'Data Reduction upon...' switched on.