Select to view content in your preferred language

getUser function Error Failed to query url

909
3
Jump to solution
07-28-2022 11:46 AM
Jake_S
by Esri Contributor
Esri Contributor
Has anyone worked with the getUser Arcade Function to return the current user name and Control Editing Access?
 
When using the Arcade Portal() function I get the following error.
JS_Esri_3-1659033769279.png
I can copy and paste that URL into the browser of the environment and access the Portal.

Any thoughts? Below is the code, it's a very basic constraint rule copied from the video here the URL and group name are the only things switched out. 
 
 

 

 

//if the edit is on defualt we need to check the suer group
var p =  Portal("https://[[portal name]].com/portal");
//get the user full object
var u = getUser(p);
//get the user groups
var groups = u.groups
//if the user is in the SuperEditor group allow the edit
if (Find("Default Editors",groups) > 0) {
     return true //allow edit
}
return false //fail edit

 

 

Tags (1)
0 Kudos
2 Solutions

Accepted Solutions
Jake_S
by Esri Contributor
Esri Contributor

UPDATE: 

This is a known bug introduced in 10.9.1 and is scheduled to be fixed in a future patch. 

View solution in original post

0 Kudos
HusseinNasser2
Esri Contributor

Bug can be tracked here BUG-000151193

View solution in original post

3 Replies
Jake_S
by Esri Contributor
Esri Contributor

UPDATE: 

This is a known bug introduced in 10.9.1 and is scheduled to be fixed in a future patch. 
0 Kudos
HusseinNasser2
Esri Contributor

Bug can be tracked here BUG-000151193

Jake_S
by Esri Contributor
Esri Contributor

Thank you sir!

0 Kudos