Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
pschwegler003
Contributor II
Contributor II

Get string UserID from OSUser Qlik Load Script

Hi Community,

I would like to get only e-mailadres from the OSUser(). 

Result of OSUser is as follows:
UserDirectory = IDAM; UserId=name.surname@xxx.com

I would like to story the next string in a variable: 
name.surname@xxx.com

Tried several things like:
LET vActiveUser_email = '=right(vActiveUser_OSuser,len(vActiveUser_OSuser)-findoneof(vActiveUser_OSuser,";")-8)';

Could anyone help plz?

Thanks, Pascal

 

 

 

1 Solution

Accepted Solutions
Mauritz_SA
Partner - Specialist
Partner - Specialist

Hi @pschwegler003 

You can also use

Spoiler
LET vActiveUser_email = SubField(OSUser(),'=',-1);

Hope this helps.

Regards,

Mauritz

View solution in original post

6 Replies
lorenzoconforti
Specialist II
Specialist II

LET vActiveUser_email =right('$(vActiveUser_OSuser)',len('$(vActiveUser_OSuser)')-findoneof('$(vActiveUser_OSuser)',';')-8);

pschwegler003
Contributor II
Contributor II
Author

Thank you for your reply. 

Unfortunately, the result of that is : ")".

Ideas?

Mauritz_SA
Partner - Specialist
Partner - Specialist

Hi @pschwegler003 

You can also use

Spoiler
LET vActiveUser_email = SubField(OSUser(),'=',-1);

Hope this helps.

Regards,

Mauritz

pschwegler003
Contributor II
Contributor II
Author

This works! Thanks a lot!

qlikF
Contributor
Contributor

Kurze Frage: warum -1?

MarcoWedel

weil es der erste Teilstring von hinten sein soll