Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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.
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
Didn't make any difference!
I've changed the Sheet IDs to SH02 and SH03 but it still doeasn't work!
I have version 11 initial release and for me it works.
See attached file!
Hope it helps
Strange. I've tried your app in 10SR3 and 11SR2 but it doesn't work.
Which sheet is activated when you save thw qvw?
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!
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 (???).