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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
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
cspencer3
Creator II
Creator II

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.

Not applicable
Author

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.