Select to view content in your preferred language

GetUser Arcade function not reading username correctly

597
2
Jump to solution
07-24-2024 08:56 AM
MargoHuang
Occasional Contributor

Hi all,

I am trying to return user email by passing user name into GetUser function in portal. This is the function I am trying to use - https://developers.arcgis.com/arcade/function-reference/portal_functions/#getuser

I am testing my Arcade function in ArcGIS Workflow Manager. Most of our user names contain character '@', when I try GetUser($currentPortal,'firstname.lastname@domain')['email'], it returns the arcade function back to me. When I try GetUser($currentPortal,'firstname.lastname')['email'] for users who don't have the domain name in their username, it returns the desired email address. I didn't find any information related to '@' being a special character in Arcade function. Does anyone know what might be causing this and how to fix it?

I am using portal admin account, so I do have the correct privilege to access emails.

Thanks.

Margo

1 Solution

Accepted Solutions
MargoHuang
Occasional Contributor

Still not sure why that happens but I found a work around by using Replace(). Our portal user accounts are firstname.lastname@PortalDomain. And our emails are firstname.lastname@emailDomain. Since the two formats are the same except that last part, I am able to replace portal domain with email domain to get the emails.

View solution in original post

0 Kudos
2 Replies
MargoHuang
Occasional Contributor

Still not sure why that happens but I found a work around by using Replace(). Our portal user accounts are firstname.lastname@PortalDomain. And our emails are firstname.lastname@emailDomain. Since the two formats are the same except that last part, I am able to replace portal domain with email domain to get the emails.

0 Kudos
MargoHuang
Occasional Contributor

Wanted to post an update. We had the issue when we were on Enterprise 10.9.1. Since our migration to 11.3, this seems to have been resolved. 

0 Kudos