ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Core.Data Namespace / Table Class / IsJoinedTable Method
Example

In This Topic
    IsJoinedTable Method
    In This Topic
    Gets a value indicating whether this Table was obtained as a result of joining a Table or a FeatureClass with another Table or FeatureClass from the same or different Datastore. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public bool IsJoinedTable()
    Public Function IsJoinedTable() As Boolean

    Return Value

    true if this is a joined table; otherwise, false.
    Example
    Getting a Table Definition from a Layer
    // GetDefinitionFromLayer - This code works even if the layer has a join to another table
    private TableDefinition GetDefinitionFromLayer(FeatureLayer featureLayer)
    {
      // Get feature class from the layer
      FeatureClass featureClass = featureLayer.GetFeatureClass();
    
      // Determine if feature class is a join
      if (featureClass.IsJoinedTable())
      {
        // Get join from feature class
        Join join = featureClass.GetJoin();
    
        // Get origin table from join
        Table originTable = join.GetOriginTable();
    
        // Return feature class definition from the join's origin table
        return originTable.GetDefinition();
      }
      else
      {
        return featureClass.GetDefinition();
      }
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also