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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
samantha92
Contributor III
Contributor III

Select in field trigger using OSUser

Hi guys,

Having a slight problem here.

I want to be able to automatically select a manager from a list box when that said managers opens my report.

I have tried using macros but had no joy.

I have created a trigger 'On Open' and added this into my search string =OSUser() but I know it's not going to be as simple as this.

Anyone have any ideas on how I can automatically select the manager from my list box when they open the report using a trigger?

Thank you

1 Solution

Accepted Solutions
sunny_talwar

=OSUser usually gives the Directory Name also and I have a feeling that your listbox for manager might include just the name. Trim =OSUser based on how the manager list box looks and then try to use that as the expression for On Open Trigger.

UPDATE: See if the attach works for you.

View solution in original post

3 Replies
sunny_talwar

=OSUser usually gives the Directory Name also and I have a feeling that your listbox for manager might include just the name. Trim =OSUser based on how the manager list box looks and then try to use that as the expression for On Open Trigger.

UPDATE: See if the attach works for you.

samantha92
Contributor III
Contributor III
Author

Hi Sunny,

I came up with this and this seems to do the trick:

=if(Lower(mid([Responsible Manager],(index([Responsible Manager],' ')+1))&left([Responsible Manager],1))=mid(OSUser(),(Index(OSUser(),'\')+1)),[Responsible Manager])


Thank you very much for your help!

sunny_talwar

Great