Unable to save contingent values in ArcGIS Pro 2.5.1

1087
4
05-07-2020 09:02 PM
VinceE
by
Occasional Contributor II

This is a similar issue another user posted (with nearly the same title), however this is occurring in Pro v2.5.1, and my experience with the "Save" button is slightly different.

Original post about a similar issue: Unable to Save Contingent Values in ArcGIS Pro 2.3.0 

To address some issues that came up in that thread: I have an Advanced License, there are no subtypes involved here (should there be?), and I am not currently editing anything (same experience in a fully loaded map vs. a new, unsaved project).

My issue is that I am able to add new contingent value "pairs" using the drop downs in the Contingent Values window, and can then hit the save button, however upon "saving," they are just removed and I am left with a blank list again. I am not getting any error messages or warnings, and the colored indicator square in the table is green.

The general setup:

I have two fields in the field group (both TEXT type) from the same feature class. Each of the two fields has a unique domain, both of which use Coded Values. Both of the fields do not allow NULL values. While creating new features, I can successfully set the values for both fields, from their respective domains, and then proceed to create the feature.

I have tried setting up the geodatabase, feature class, fields, domains, and the grouped fields for the contingent values using arcpy, and also doing the whole thing manually in the GUI, both to no avail. Everything else up to this step appears to work just fine.

I have not tried adding the specific contingent value pairs using arcpy, but my feeling is that I'm doing something incorrectly before the adding values part, so I'd like to figure that out first. Not entirely sure I understand the setup for the CSVs to be used in the arcpy/geoprocessing tool either. As a side note, if anyone has a link to examples of what these look like, that would be helpful. I can't quite decipher how these are set up from the help docs.

Added contingent valuesContingent values disappearing after save

First image shows the CVs added, second image shows them disappear immediately after save. This is coming straight out of "Focus on Geodatabases in ArcGIS Pro" (2019) if the field group, fields, or individual CVs look familiar.

Thanks in advance if anyone has ideas.

UPDATE:

Adding via arcpy does seem to work. Interestingly, once one has been added, doing it manually via the GUI seems to allow saving as well. This probably solves my issue, but I'd be curious if others have the same problem.

4 Replies
KoryKramer
Esri Community Moderator

I haven't tested this, but I found a bug that sounds like it is describing what you're seeing: [BUG-000130108] Contingent values cannot be saved in a field group created using the Create Field Group tool.

There is a workaround listed: 

Create a new field group using the following steps:

  1. Highlight the feature class in the Contents pane.
  2. In the Feature Layer contextual tab, select the Data tab and click the Contingent Values from the Design group.
  3. In the Contingent Values tab, click Field Groups from the Design group.
  4. Create a new field group using the Field Groups dialog box.

If you try that, does it work for you?

VinceE
by
Occasional Contributor II

Hey Kory thanks for taking a look at this.

The issue I described was not a result of using the Create Field Group tool, but the UI method you provided above. Only reason I'm sure of that is that I was just following along in the book, and that is how it is done there. I just tried the Create Field Group tool from within the UI and am experiencing this bug though.

I was able to build the geodatabase, set the domains, and populate the CVs successfully all via arcpy (which does use some form of the Create Field Group tool I suppose). If I then go and delete the Field Group (manually, or with the GP tool), re-add the Field Group (manually), I can then go in an add the CVs back in (manually again). Since I haven't rebuilt the whole geodatabase and domains by hand to get to this point (just using the existing GDB I created with the script), I'm not totally recreating the situation. Could certainly have been some user error along the way in the manual building that I just happened to get right when I did the whole thing using arcpy.

Looks like problem solved, aside from the GP tool, but seems like the workarounds are just fine. Thanks again for the help.

0 Kudos
VinceE
by
Occasional Contributor II

To follow up though, it appears setting a subtype field via arcpy (SetSubtypeField) removes the contingent values. Does that sound like expected behavior? The CVs also seem to get removed if the subtype setup is done through the UI, where the specific subtype field, the codes and descriptions, and the default subtype can all be set at once. Rather than automatically populating the CVs across each of the newly defined subtypes, they just get removed. This seems contrary to what happens with both domains and default values, which will get populated across newly defined subtypes if they had previously applied.

0 Kudos
KariBuckvold1
New Contributor

wow, yes, what a weird 'rain dance' solution: adding one CV via (arcpy.AddContingentValue_management) seems to unlock the the CV such that you can add additional values and actually SAVE.  Thanks for figuring that out.  Hopefully they iron out that bug soon!

0 Kudos