Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

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
Highlighted
MVP
MVP

Re: Different default selections for different users

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

Highlighted
Not applicable

Re: Re: Different default selections for different users

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.

Highlighted
MVP & Luminary
MVP & Luminary

Re: Different default selections for different users

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

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
Highlighted
Not applicable

Re: Different default selections for different users

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.