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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
SebastienPreau
Contributor III
Contributor III

Using OSUser in SetAnalysis

Hello,

We need to use the OSuser in a SetAnalysis in QlikSense September 2018.

So far, we have tried this :

[PERIM_CRCO.TYPE_PERIM]={'PERIM_OPE'},[PERIM_CRCO.C_LOGINAD]={"=upper(subfield(OSuser(),'=',3))"}

or

[PERIM_CRCO.TYPE_PERIM]={'PERIM_OPE'},[PERIM_CRCO.C_LOGINAD]=upper(subfield(OSuser(),'=',3))

but none seems to work.

NB :

=> we do not want to use Security as we want to have several values for PERIM_CRCO.TYPE_PERIM

 

 

Labels (3)
2 Solutions

Accepted Solutions
agigliotti
Partner - Champion
Partner - Champion

yes could be as you said.
let's try using the below expression in your set analysis:
[PERIM_CRCO.C_LOGINAD] = {"=$(=upper(subfield(OSuser(),'=',3)))"}

I hope it can help.

View solution in original post

SebastienPreau
Contributor III
Contributor III
Author

[PERIM_CRCO.C_LOGINAD] = {"$(=upper(subfield(OSuser(),'=',3)))"}

Works !!!

Thanks.

We are going to test passing it through a variable and if OK, problem solved !

 

 

View solution in original post

8 Replies
agigliotti
Partner - Champion
Partner - Champion

what means '=' sign in subfield ?
SebastienPreau
Contributor III
Contributor III
Author

OSUser returns something as Domain = XXX; Userid = spreau

As i just want spreau, i use subfield

SebastienPreau
Contributor III
Contributor III
Author

I mean subfield is used to retrieve the third part of the string when cut along the character '='
agigliotti
Partner - Champion
Partner - Champion

are you sure?
I got "domain\username" pattern as OSUser() output.
SebastienPreau
Contributor III
Contributor III
Author

Capture.PNG

SebastienPreau
Contributor III
Contributor III
Author

I Suppose the pattern may vary depending on the way the server is linked with AD ?

agigliotti
Partner - Champion
Partner - Champion

yes could be as you said.
let's try using the below expression in your set analysis:
[PERIM_CRCO.C_LOGINAD] = {"=$(=upper(subfield(OSuser(),'=',3)))"}

I hope it can help.
SebastienPreau
Contributor III
Contributor III
Author

[PERIM_CRCO.C_LOGINAD] = {"$(=upper(subfield(OSuser(),'=',3)))"}

Works !!!

Thanks.

We are going to test passing it through a variable and if OK, problem solved !