SchemaBuilder Error on long/short field mismatch

289
1
06-06-2023 01:39 PM
WilliamBuerger
Occasional Contributor

I've been trying to do some schema updates on existing feature classes such as changing a subtype description.  I'm using the SchemaBuilder to make the update.  As a first test, I was following the example from the SchemaBuilder.Modify(TableDescription) documentation and it kept failing with the message...

Error: The domain field type does not match that of the field it is being assigned to.

As seems to be usual for these kinds of things, there's no mention what field has the error.  There are 381 fields in this table so that's a lot of fields to check for what the problem might be.  It would be extremely helpful if the error message indicated what field has the issue.  I had to delete fields until I didn't get the error and then work down to the specific field.  Turns out the issue is that the field type is long but the domain type is short.  I understand they don't match but a long can hold any value a short can so it seems to be a non-issue.  But more importantly, I can do any of these schema edits manually and Pro doesn't complain and allows the schema changes to occur.  It seems that the SchemaBuilder is more picky about what is allowed than Pro is itself.

Tags (1)
0 Kudos
1 Reply
WilliamBuerger
Occasional Contributor

To add a specific here, this comes from the Gas and Pipeline UN Foundation Asset Package in the PipelineDevice feature class where the TierName field is long and the assigned Network_5_TierName domain is set as short.  I just downloaded the latest version to verify it wasn't an old or modification that was made.  But it's there as well.

0 Kudos