ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Data Namespace / Row Class / FindField Method
The name of the field to be found.
Example

In This Topic
    FindField Method (Row)
    In This Topic
    Gets the index position for a field by name. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function FindField( _
       ByVal fieldName As String _
    ) As Integer
    public int FindField( 
       string fieldName
    )

    Parameters

    fieldName
    The name of the field to be found.

    Return Value

    A positive integer value if the field is found indicating the index position of the field. If a field is not found with a name matching the fieldName, a -1 is returned.
    Exceptions
    ExceptionDescription
    A geodatabase-related exception has occurred.
    Example
    Writing a value into a Guid column
    {
      // Must be called within QueuedTask.Run
      void WritingIntoGuidColumn(Row row, Field field, Guid guid)
      {
        row[field.Name] = "{" + guid.ToString() + "}";
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also