Before you can create relationships in Networks Editor, a relationship class must exist between the feature class or table of the active feature and the feature class or table to relate. The relationship class determines which records can be related and whether the relationship is one-to-one, one-to-many, or many-to-many.
Configure relationships in the geodatabase, and publish the relationship classes as part of the feature service used by the application.
For information about configuring the origin and destination classes, relationship type, cardinality, and key fields, see Create Relationship Class in the ArcGIS Pro documentation.
You must use Global ID fields instead of Object ID fields as relationship keys so that Networks Editor can support relationships reliably.
There are certain predefined rules for every feature when it comes to creating a relationship between features, see Manage Relationship Class Rules.
You can configure whether annotation and document relationships are displayed by default when the application is initialized.
To configure the default visibility, set the following properties in the relations-view-comp-1 section of the application JSON:
1.showAnnotationRelationships: Specifies whether annotation relationships are displayed by default.
2.showDocumentRelationships: Specifies whether relationships to external documents are displayed by default.
Set the properties to true to show the corresponding relationships or false to hide them.
Example:
{
"id": "relations-view-comp-1",
"title": "language-app-networks-relations-view-title",
"featureContextActions": "item://menu/feature-context-actions",
"icon": "table",
"relationshipContextActions": "item://menu/relationship-context-actions",
"showAnnotationRelationships": true,
"showDocumentRelationships": true,
"$type": "relations-view-model"
}
Both properties are set to true by default. The configured settings are applied when the application is initialized. If a user changes the visibility settings using the Filter Relationships dialog, their preferences are saved and take precedence over the configured defaults when the application is reopened.