Hello. I have encountered an anomaly while using an Inspector object to set attribute values for merged polyline features. I am using the Merge(Layer,IEnumerable<Int64>,Inspector) method as part my edit operation.
The feature table I'm working with has fields that are not null, domains applied, and default values set. When assigning attribute values for the merged feature using the Inspector, I have noticed that if I assign the default value for the field, the value will not be applied and I get a field validation error because the value must not be left null. If I don't assign a value at all for the field, the default value is still not applied. If I assign any other value listed in the domain that is not the default value, the attribute value is successfully applied.
In searching for similar forum posts, I found this. It follows a somewhat similar pattern, but when working with feature templates:
I am using version 3.4 of the SDK and do not recall having this issue with previous versions. Thanks for your time!
Solved! Go to Solution.
Hello,
We found a similar issue within our Pro 3.5 development cycle where the EditOperation.Create(Layer, Inspector) created rows with null values instead of the default values with fields that have domains attached. It sounds very much like the issue you are seeing.
We fixed this issue within 3.5 which was released a few days ago. Are you able to upgrade to Pro 3.5 to see if your issue is resolved?
If you are not able to upgrade, then would adding a Modify after the Merge (within the same EditOperation) be a workaround. Make sure that you specify EditOperation.ExecuteMode = ExecuteModeType.Sequential prior to the Merge and Modify calls. I would suggest using the version of the Modify that takes a dictionary of attributes - https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic9530.html
Thanks
Narelle
Hello,
We found a similar issue within our Pro 3.5 development cycle where the EditOperation.Create(Layer, Inspector) created rows with null values instead of the default values with fields that have domains attached. It sounds very much like the issue you are seeing.
We fixed this issue within 3.5 which was released a few days ago. Are you able to upgrade to Pro 3.5 to see if your issue is resolved?
If you are not able to upgrade, then would adding a Modify after the Merge (within the same EditOperation) be a workaround. Make sure that you specify EditOperation.ExecuteMode = ExecuteModeType.Sequential prior to the Merge and Modify calls. I would suggest using the version of the Modify that takes a dictionary of attributes - https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic9530.html
Thanks
Narelle
Thank you! I can confirm that this issue appears to be resolved now after upgrading to Pro 3.5.