Field Maps - Constraint Rule - Feature Form Caching Wrong Data - Major Headache

223
1
Jump to solution
03-15-2024 05:51 PM
LanceKirby2
Occasional Contributor II

I have a Constraint Attribute Rule setup in ArcGIS Pro. I am running Enterprise 11.1 and have a feature service referencing data in an Enterprise Geodatabase. It is non-versioned, archive enabled. This constraint rule validates some data when a user submits a record through Field Maps and returns a custom error message if the data isn't valid.

My issue is best described through an example. I take a record that had no errors and edit it, launching the form. I then edit that record again, this time supplying data that violates the constraint and should error out. I then attempt to submit that record and receive the custom error message as expected. This error message allows me to close it by clicking "OK", which closes that message. I then hit Cancel to return to the previous page (the records popup). When I do, I get another error "ERROR Geodatabase field not found" (can not figure out why this is popping up, but not the main issue). I click OK to close that window and it takes me back to the popup. I then click Edit on that window again, which brings up the form, but all of the erroneous data I supplied in the previous edit is still there as if it had successfully submitted in the previous edit. I know for a fact it didn't submit since I can look at the table within the database. In addition, when I completely exit the map, reload it, navigate back to that record and begin editing it I then see the correct non-erroneous data. It's almost if Field Maps is caching the form data for some reason.. Any help would be appreciated!

I'm tagging @JeffShaner @JamesTedrick @BrettStokes as I watched your session at the dev summit virtually, but could not be there in person to ask this question. 

 

-EDIT

After a lot more trial and error, I still haven't resolved the issue. It seems like the error, "ERROR Geodatabase field not found", is related to the issue and triggered by anytime I return an error message in an attribute rule. I've tried this on both calculation and constraint rules and both lead to the same result. I've even simplified the rule down to

 

return {'errorMessage': 'This message triggered'}

 

so I could trigger the error every time and sure enough I run into the issue. Is this the expected behavior? I've tried the same edit in Collector and while I don't get the error message, I do raise an error and cancel that edit then return to the form with the form reset to the correct data.

 

- EDIT 2

Last follow up here. I've resolved the issue in a non ideal way. The table I was using is part of the feature layer item and was added to the map with the rest of the layers in the item. I removed this table from the map and added it back directly from the service url and that seems to have fixed the issue.

0 Kudos
1 Solution

Accepted Solutions
LanceKirby2
Occasional Contributor II

See edit above. Marking as resolved.

 

View solution in original post

0 Kudos
1 Reply
LanceKirby2
Occasional Contributor II

See edit above. Marking as resolved.

 

0 Kudos