I have a field that is not required, but calculated and automatically set to read-only. The field is supposed to select an organization based on the logged in user. If the user doesn't have an associated organization, it should be null - however, the field just has a line through it and it is preventing data from being submitted even though the field isn't required?
It throws a "Failed to calculate" message and when I hit submit the message is "Unable to Submit - 1 attribute failed"
Hey @luckachi
Would you be able to show a screenshot of the submission and the failure? I do know sometimes that a required field will require something in it at least, in mine, I have an else condition at the end which gives a minus symbol or another mark that designated it wasn't entered.
Cody
@CodyPatterson Sure thing!
Logs:
It seems to work just fine in the web map and in experience builder and it doesn't throw any issues when I run it in the arcade builder
Hey @luckachi
I see! This is exactly what happened to us as well, do you have these all enabled?
It should look like this here:
And this in the map:
Does this match your current setup?
Cody
I do not
but interestingly enough I just changed my arcade script and added $layer into the var user line it worked. Not sure if that would cause any unintended issues.
I wonder if this doesn't work in field maps - to get the logged in username?
var user = GetUser();
var username = Lower(user.username);
Hey @luckachi
The syntax could definitely be it, this is what I have here:
I wonder if the GetUser function you were using was not able to find the origin layer to pull the name from!
Cody