Select to view content in your preferred language

RowToken's GlobalID and ObjectID properties are null for Group Templates

563
5
Jump to solution
11-18-2024 04:13 AM
robertopepato_bizpoke
Regular Contributor

I'm working on an AddIn, and while inspecting the GlobalID and ObjectID of a RowToken instance (returned from a Create method call on an EditOperation), I'm getting null values. The RowToken itself is instantiated, but its properties are null.

This only happens when dealing with Group Templates, as the same strategy and source code work for regular templates (sample source coded attached to this message).

Does anyone have ideas about what could be the root cause of this behavior?

0 Kudos
2 Solutions

Accepted Solutions
RobertKrisher
Esri Regular Contributor

Because a group template or preset template can contain multiple features, it doesn't make sense that we would be able to provide a single row token back for the operation.

View solution in original post

0 Kudos
RobertKrisher
Esri Regular Contributor

I would recommend you create an idea for this, but do it in the data management community since this is much broader than the utility network.

In terms of a way to capture what you're looking for, you could use version differences to find all the newly created features in a version or you could use an attribute rule to respond to the edit.

View solution in original post

0 Kudos
5 Replies
RobertKrisher
Esri Regular Contributor

Because a group template or preset template can contain multiple features, it doesn't make sense that we would be able to provide a single row token back for the operation.

0 Kudos
robertopepato_bizpoke
Regular Contributor

Appreciate your input @RobertKrisher

That's what I thought initially (and in this case, maybe having the Create operation return a list of RowTokens would be semantically appropriate for situations like this one?). Still, an idea came to mind (as a suggestion for evaluation for future API releases). Since the group template has a primary builder, maybe the RowToken of the primary builder could be returned (so we can navigate to the other created elements through associations). Does this make any sense?

And getting back to the point of the original issue I'm trying to solve, do you recommend (or know if there is) any other way of holding a reference to a created network element (through a Group Template) so I can get back to it later after the EditOperation is executed?

0 Kudos
RobertKrisher
Esri Regular Contributor

I would recommend you create an idea for this, but do it in the data management community since this is much broader than the utility network.

In terms of a way to capture what you're looking for, you could use version differences to find all the newly created features in a version or you could use an attribute rule to respond to the edit.

0 Kudos
robertopepato_bizpoke
Regular Contributor

Will do it. Thank you again @RobertKrisher 

0 Kudos
robertopepato_bizpoke
Regular Contributor

In case anyone is interested in the follow-up to this topic, the idea is posted here:

https://community.esri.com/t5/data-management-ideas/editoperation-create-should-support-group/idi-p/...

0 Kudos