Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Trigger a set variable based on USERID

Namaste all

I have successfully implemented section access on my file and uploaded it on the server with the help of you guys..

Please help me with the following trigger settings..

I have implemented section access in my file,

But, I am unable to Trigger a variable based on USERID,

I will explain my scenario.

I have three sheets in my document L1, L2, L3   and i have users user1, user2, user3 and the variable i want to trigger is LineNo.

I want variable LineNo to set to 1 when i open as user1, LineNo=2 when i login as user2 , LineN=3 when i login as user3.

please find the attached qvw file and excel file to check my code and trigger settings..

Please see my if condition, at the trigger->document properties->onopen->set variable

Admin credentials:

Username : Rahul

PAssword : Rahul101

section access is not hidden

Thank you in advance

1 Solution

Accepted Solutions
sunny_talwar

See if the attached file solves all the issues

View solution in original post

36 Replies
sunny_talwar

Try this:

=if(USERID='user1',1,

  if(USERID='user2',2,

  if(USERID='user3',3,0)))

jerrysvensson
Partner - Specialist II
Partner - Specialist II

And OnOpen trigger will of course only work if you use Plugin as client.

Not applicable
Author

Thanks for quick reply

still it is not working , when i login as user

please see the attached file with the changes

Thank you

sunny_talwar

Infact this:

=if(USERID='USER1',1,

if(USERID='USER2',2,

if(USERID='USER3',3,0)))

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

try this expression. in Trigger

=if(Qvuser()='USER1',1,

  if(Qvuser()='USER2',2,

  if(Qvuser()='USER3',3,0)))

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
sunny_talwar

Try the attached

Not applicable
Author

Hi Jerry,

Thanks for the quick reply

could you explain me this a little bit more or please provide any links to how to do it.

at the  moment i am working on qlikview personal edition which is liecensed, and after i will upload the file onto the server to access from browser using access point..

could you please explain me which plugin to use, how to make it work on both browser and the QV personal edition

Thanks in advance

kkkumar82
Specialist III
Specialist III

As Koushik suggested use QVuser in a text box for a particular user and check whether you are getting the required users or not

jerrysvensson
Partner - Specialist II
Partner - Specialist II

It works on Personal Edition (Developer).

When uploaded to server you can access it from Accesspoint. There you can use Plugin (ActiveX Component) or WebView (Ajax). Using Webview as client OnOpen will not trigger. See reference manual.