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: 
Anonymous
Not applicable

OSUser vs QVUser

I wanted to know how OSUser and QVUser works

For e.g If I have A.qvw file in which I am using OSUser (Let osUser = OSUser()) and QVUser (Let qvUser = qvUser()) in script

Without reloading what will be the value when different users access A1.qvw file?

Means I (as User1) reloaded the file and deployed it.

When User1 and User2 access the A1.qvw file what will be the value of variable osUser and qvUser in script.

11 Replies
Anonymous
Not applicable
Author

I tried section access but it reduces the data. Means it displays the rows which is applicable to that user.

I want to show all the records from table but mask the data in critical columns which is not applicable to him.

When I am trying to use ='=OSUser()' ( which fits my requirement) in where clause as follows it gives error = =Osuser not found.

Let vuser= '=OSUser()';

//Sql connection string

Configusers:

SQL SELECT [UserID],[Country] FROM tbl_Entitlement;

NoConcatenate

Config2:

load  [UserID] ,Country resident ConfigUsers where UserID= '$(vuser)';

Also, I have tried the following, but the error = =Osuser not found is displayed.

Config3:

load  [UserID] ,Country resident ConfigUsers where UserID= '=OSUser()';

swuehl
MVP
MVP

Something like

LET User = '=OSUser()';

will create a variable that is updated dynamically in the frontend, not in the script.

If you want to use the user in the script, just use

LET User = OSUser();

and then

Config3:

load  [UserID] ,Country resident ConfigUsers

where UserID= '$(User)';

But I can't see how this will be better serving your requirements than the section access approach.

But I don't have much more time to spend on this, so hopefully you have enough Information to work on.