Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
elijahabel
Contributor III
Contributor III

How to Parse OSUser() and store the result in a variable

For our application, we need to be able to retrieve the current user ID so that we can use it to look up data entitlements.

 

Currently, OSUser() is returning "UserDirectory=Directory1; UserId=user234"

 

What expression can I use to store only "user234" in a variable? I'm having trouble finding String manipulation functions that would help solve this problem in Qlik Sense.

 

Thank you in advance! 

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar

This might work as well

SubField(OSUser(), '=', -1)

View solution in original post

3 Replies
marcus_sommer
MVP & Luminary
MVP & Luminary

You could use: subfield(subfield(osuser(), ';', 2), '=', 2)

- Marcus

sunny_talwar

This might work as well

SubField(OSUser(), '=', -1)

View solution in original post

elijahabel
Contributor III
Contributor III
Author

Marking this the correct solution because it is a little cleaner. Thank you, both!