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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Different start sheet based on OSUser when opening the application

I load DomainUser and Sheet in script. The application contains three sheets in GUI. When USER1 opens the application I wan't the sheet USER1 (SH02) to be activated, when USER2 opens the application I wan't the sheet USER2 (SH03) to be activated.

I've added two triggers on open:

1. Select in Field: DomainUser with search string =Upper(OSUser())

2. Activate Sheet: Sheet ID =Sheet

This doesn't work. Any ideas?

Before reloading the script, change the field DomainUser to your DOMAIN and USERNAME (in UPPER CASE).

/Magnus

14 Replies
Not applicable
Author

Hey Magnus,

Create a new variable wich containts the OSUser.

For eg:

vUser=

if(upper(OSUser()='USER1','SH02',

upper(OSUser()='USER2','SH03'))

Then use this variable for the trigger activate sheet

Hope this helps,

Gr.

Frank

sujeetsingh
Master III
Master III

Framk ,

One question that what about the code where to put the code and how to set default sheet to be opened when document first opened.

Anonymous
Not applicable
Author

You need to change your script:

your sheets are name clmag and clmic

instead of SH02 and SH03

change your script to that

DOMAIn\}USER1   clmag

DOMAIN\USER2   clmic

and it works

Regards

Not applicable
Author

Didn't make any difference!

Not applicable
Author

I've changed the Sheet IDs to SH02 and SH03 but it still doeasn't work!

Anonymous
Not applicable
Author

I have version 11 initial release and for me it works.

See attached file!

Hope it helps

Not applicable
Author

Strange. I've tried your app in 10SR3 and 11SR2 but it doesn't work.

Which sheet is activated when you save thw qvw?

Anonymous
Not applicable
Author

pls open a textbox with "=osuser()". is there a difference in spelling?

This is really strange because in my local app it works as expected!

Not applicable
Author

Exactly the same!

I've noticed that if I save the app on the Dashboard sheet with the DomainUser selected (=OSUser), then sheet SH02 will be activated next time I open the app.

But if I clear all selections and save the app on the Dashboard sheet, then SH02 will not be activated (???).