The View Fields Manager service is scheduled for deprecation in the Relativity Indigo release during January 2020. Don’t implement any new custom functionality with this service and begin upgrading any applications that currently reference it. For more information, see Deprecated functionality.

View Fields Manager API

A View Field is an object that contains specific information about a field. You can use the View Fields Manager API to view the relation between the Artifact IDs of View Fields objects and the Artifact IDs of a production. To learn more about productions, visit Production overview.

A View Field is an object that contains specific information about a field. You can use the View Fields Manager API to perform various operations which show the relation between View Fields objects and a production or a saved search. To learn more about productions and saved searches, visit Production overview and Saved Search. It also supports retrieving View Field objects for every exportable field in a workspace for a specific Artifact Type.

As a sample use case, you might use this service during the export process of Relativity Integration Points to retrieve all of the exportable View Fields in a workspace as well as the Artifact IDs of View Fields related to the exported view or production.

You can also use the View Fields Manager service through the REST API. For more information, see View Fields Manager service.

This page contains the following information:

Fundamentals for View Fields Manager service

In the Services API, the Relativity.Service.Interfaces namespace contains the IViewFieldManager interface and additional classes required to interact with Relativity View Fields. The IViewFieldManager interface contains the methods required to access the functionality provided by this service. The interface contains the following methods:

RetrieveAllExportableViewFieldsAsync() - retrieves every exportable field in a specific workspace for a specific Artifact Type. To learn more, visit Fields.

RetrieveViewFieldIDsFromProductionAsync() - retrieves the Artifact ID of a specific production and the Artifact ID of View Fields that represent the Bates fields for that production. To learn more about Bates numbering, visit Production sets.

RetrieveViewFieldIDsFromSearchAsync() - retrieves the Artifact ID for a view and the View Fields Artifact IDs for any fields in a saved search that is associated with that view. To learn more, visit Saved Search and Views.

Retrieve View Fields in a workspace for a specific Artifact Type

This method retrieves View Fields for every exportable field in a specific workspace for a specific Artifact Type.

public async Task<ViewFieldResponse[]> ReadExportableViewFieldsAsync(int workspaceID, int artifactTypeID)
{
    using (IViewFieldManager viewFieldManager = serviceFactory.CreateProxy<IViewFieldManager>())
    {
        ViewFieldResponse[] viewFieldResponses = await viewFieldManager.ReadExportableViewFieldsAsync(workspaceID, artifactTypeID);
        return viewFieldResponses;
    }
}

Retrieve View Field IDs from a production

This method retrieves the Artifact ID of a specific production and the Artifact ID of View Fields that represent the Bates fields for that production.

To view the Artifact IDs for View Fields and the production, see the following code sample:

public async Task<ViewFieldIDResponse[]> ReadViewFieldIDsFromProductionAsync(int workspaceID, int productionArtifactID)
{
    using (IViewFieldManager viewFieldManager = serviceFactory.CreateProxy<IViewFieldManager>())
    {
        ViewFieldIDResponse[] viewFieldIDResponses = await viewFieldManager.ReadViewFieldIDsFromProductionAsync(workspaceID, productionArtifactID);
        return viewFieldIDResponses;
    }
}

Retrieve View Field IDs from a production

This method retrieves the Artifact ID of a specific production and the Artifact ID of View Fields that represent the Bates fields for that production. The ArtifactTypeID is currently unused.

To view the Artifact IDs for View Fields and the production, see the following code sample:

public async Task<ViewFieldIDResponse[]> ReadViewFieldIDsFromSearchAsync(int workspaceID, int artifactTypeID, int productionArtifactID)
{
    using (IViewFieldManager viewFieldManager = serviceFactory.CreateProxy<IViewFieldManager>())
    {
        const int artifactTypeID = 0;
        ViewFieldIDResponse[] viewFieldIDResponses = await viewFieldManager.ReadViewFieldIDsFromProductionAsync(workspaceID, artifactTypeID, productionArtifactID);
        return viewFieldIDResponses;
    }
}

Retrieve View Field IDs from a saved search

This method retrieves the Artifact ID for a view and the View Fields Artifact IDs for any fields in a saved search that is associated with that view.

public async Task<ViewFieldIDResponse[]> ReadViewFieldIDsFromSearchAsync(int workspaceID, int artifactTypeID, int viewArtifactID)
{
    using (IViewFieldManager viewFieldManager = serviceFactory.CreateProxy<IViewFieldManager>())
    {
        ViewFieldIDResponse[] viewFieldIDResponses = await viewFieldManager.ReadViewFieldIDsFromSearchAsync(workspaceID, artifactTypeID, viewArtifactID);
        return viewFieldIDResponses;
    }
}