Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 elijahabel
		
			elijahabel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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!
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You could use: subfield(subfield(osuser(), ';', 2), '=', 2)
- Marcus
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This might work as well
SubField(OSUser(), '=', -1)
 elijahabel
		
			elijahabel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Marking this the correct solution because it is a little cleaner. Thank you, both!
