Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Different default selections for different users


Hi All,

I have a scenario where I need default selections in a certain field on open of the document, which I have achieved using triggers.

For Ex:

Field name is "Stage" which has values as 0,1,2,3,4,5. The default selections are 2,3,4,5 (this can easily be done using a trigger On open of the document)

The problem occurs when a user has access only to few stages & not all,  say only to stage 2 & 3, then while opening the document qlikview tries to execute default selections trigger and tries to select 2,3,4 & 5 in stage which is not possible due to user's limited access and hangs.

Is there a way to customize default selection based on user access . I am trying to achieve it using OSUSER() but somehow not able to get it to work.

Any help is appreciated.

4 Replies
tresesco
MVP
MVP

Yes, using OsUser() or QVUser() you can achieve that. If any doubt please share your sample app.

Not applicable
Author

Hi tresesco,

The problem is, access restriction for user ids is being controlled from some other tool & not qlikview. (Qlikview just inherits it)

There are n number of users with different combination of access meaning a user can have access to Phase1,2 another to Phase 3,4,5, some other to Phase1,3 and so on. So it is not possible to use an if condition in the trigger/macro for all the possible combinations.

I am not able to figure out the logic to restrict the default selection based on the phases accessible to the user.

PFA a sample app.

P.S :Phase and Stage mean the same here.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     I am just sharing the idea, but i dont say that this will work, cause i haven't tried this before.

     The idea is, you create an excel sheet with the username and the default selections for them, link that with the username field of the section access, so for every user you will have only one value of default selection which will come from excel, then you can either use that field directly or by variable to pass in your "On Open trigger" to make selections.

     Try this and let us know, if I get time I will try and let u know, but again dont wait for me to check this.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Hi,

Thanks for sharing the idea, I just need to check how feasible it is to create an excel (as number of users is huge) and get few confirmations on this. Will surely give it try and will share the result here.