Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello QlikView Community,
I have encountered a problem. I would like to let different Users load different scripts in one .qvw file. Meaning the scripts are somehow written safed in the file but only sepcific parts are executed depending on the User. The rest will be ignored.
Is that possible
Thanks and regards
Milliohm
You can conditionally execute script by using the the IF THEN ELSE statement. In the IF test, you can test the userid as osuser().
-Rob
You can conditionally execute script by using the the IF THEN ELSE statement. In the IF test, you can test the userid as osuser().
-Rob
Hello Rob,
thanks for your quick answer. Ihave tried to apply the IF..THEN Statement but could not figure it out. I have set it as following.
IF(USERID= 'RespectiveUser') then
LOAD Statement
I tried several punctuations and sets of brackets but it just does not work :S
Regards
Hi, you have to use first in the script OSUSER() to identify the user, then as Rob say you have to use IF, ELSE THEN sentences to load the script, pherhaps you forgive a final End if; to exit to the IF statement..
good luck
Fernando
The function that identifies the user is osuser(), not USERID. So a sample script would be
IF(osuser() = 'RespectiveUser') THEN
LOAD Statement
ENDIF
-Rob
Hi guys,
thanks a lot for your help! It works now. And sorry Rob but somehow I did not notice the OSUser()
Again thnaks and have a good day
Regards