Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Selection in filed based on OSUser

Hello all,

I'm trying to make my application open up with a selected field  (DomainId), Based on the user that is opening the application.

In the attached file you can see my OSUser()=MAC-AD\pukach_h and I want the application to open where DomainId=5.

If there is another user trying to open it, for example, MAC-AD\dejav_s it will open with DomainId=3 and so on..

How can I set the right expression\trigger to get that?

Is it possible also when One user has two DoaminId?

Thank you in advance,

Hagit 

2 Replies
Highlighted
Creator II
Creator II

Re: Selection in filed based on OSUser

You could create a trigger attached to the document that when it opens it will select a value in the DomainID Field. The value that you could use could be determined upon opening using this code:

=Max({<userN = {"$(=OSUser() )"}>}DomainId)

However, this will only select the maximum domain value (or min if you use min instead), and will not select both Domains when a user has two. I have not figured out how to do that yet.

Highlighted
Not applicable

Re: Selection in filed based on OSUser

Thank you Charles!

It does work.. But I'm still looking for a solution that will help me select also two domains if needed.

If you will have any idea for me, I woul'd be happy to hear about.