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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
MVP
MVP

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.
The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it

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
MVP
MVP

what means '=' sign in subfield ?
The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
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
MVP
MVP

are you sure?
I got "domain\username" pattern as OSUser() output.
The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
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
MVP
MVP

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.
The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
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 !