Failed to evaluate Arcade Expression

1657
8
Jump to solution
01-15-2021 11:24 AM
LindseyStone
Occasional Contributor III

I just created a brand new Sewer Utility Network and have the service published and I'm trying to add new features.  When I draw a new feature I automatically get the attached error message stating "Failed to evaluate Arcade expression".  I can see the attribute rules both in my SDE properties and in my published service properties.  I also already created a Water Utility Network with the same workflow and did not have this issue.  I get this for EVERY feature when trying to create a new one.

 

 

0 Kudos
1 Solution

Accepted Solutions
PaulLeBlanc1
Esri Contributor

I looked closer at the sewer attribute rules and they need this checkbox enabled:

PaulLeBlanc1_0-1610741442917.png

 

View solution in original post

8 Replies
PaulLeBlanc1
Esri Contributor

if (IsEmpty($feature.assetid)) {
return "SJF-"+Text(NextSequenceValue("SewerJunction_20_seq"))
}
else {
return $feature.assetid
}

 

If the database sequence doesn't exist that might explain the error.

 

0 Kudos
SergueiSokolov
New Contributor III

Hello, 

I was getting this message when digitizing Ducts in UN Communication. As you suggested, I checked in the SQL Server, apparently Sequences were not created in the geodatabase (SQL Server) by the Apply Asset package GP. I have checked B_DatabaseSequence table in the source asset package "CommunicationsDataManagementForArcGISEnterpriseV1" , this table in the source Asset Package is also empty (no records).  All other Asset Packages I have used (UN Electric, UN Gas, UN Water) had the database sequences created properly. How should sequences be created the Communications v1 Utility Network? Please advise

Thank you

Serguei  

0 Kudos
PaulLeBlanc1
Esri Contributor

I believe this error message is unrelated to database sequences since the communications model doesn't have any attribute rules that use NextSequenceValue from what I can see.

"Failed to evaluate Arcade expression" is the generic error.

0 Kudos
LindseyStone
Occasional Contributor III

I just pulled up my SQL server and looked and it looks like the SDE contains all the sequence tables.  Is that where you were wanting me to look?

0 Kudos
PaulLeBlanc1
Esri Contributor

I looked closer at the sewer attribute rules and they need this checkbox enabled:

PaulLeBlanc1_0-1610741442917.png

 

LindseyStone
Occasional Contributor III

I will give that a try.  Can you explain what that check mark is and what it does and was it a bug somewhere that that wasn't automatically checked?  I brought this all over.  I didn't modify any rules from the default ESRI Sewer Asset Package.

0 Kudos
PaulLeBlanc1
Esri Contributor

From the GP help:

 


Specifies whether the rule will be excluded from evaluation before edits are applied. Because not all clients may have the capability to run all of the available rules, you can choose to flag a rule for simple clients only. For example, some rules may refer to data that has not been made available to all clients....

In this case, the client (Pro) does not have the context of the database sequence because it lives in your enterprise geodatabase, which is being accessed from services.

This page also has some more info.

 

We will update the data models and geoprocessing tool to enforce this. Thanks for reporting!


 

0 Kudos
LindseyStone
Occasional Contributor III

Checking the Exclude from application evaluation on all of the assetID rules did the trick.  I'm still curious to know what the setting actually does and if it needs to be checked on any of the other rules within the Sewer Network or if there is some sort of documentation that has that information in it.

0 Kudos