This DTO has been deprecated as part of the Relativity Services API (RSAPI) Deprecation and is no longer supported. For more information and alternative APIs, see RSAPI deprecation process.

Tab

You select tabs to access Relativity features, such as documents, RDOs, or applications. You can also use tabs as links to custom pages and other external resources. For more information, see Tabs on the Relativity Documentation site and Basic concepts for custom pages.

The Services API supports read and query operations on a Tab DTO.

Note: You can also read tabs using the common DTO ReadSingle method. For more information, see Single-artifact access.

This page contains the following information:

Read a Tab

To read Field values on a Tab, you can use the Read() method on the Tab repository as illustrated in this code sample.

Copy

public static bool Read_Tab(IRSAPIClient proxy)
{
     // STEP 1: Call the Read() method on the Tab repository.
     DTOs.Tab requestedTab = new DTOs.Tab(1034254);
     requestedTab.Fields = DTOs.FieldValue.AllFields;
      
     DTOs.ResultSet<DTOs.Tab> results = null;
     try
     {
          results = proxy.Repositories.Tab.Read(requestedTab);
     }
     catch (Exception ex)
     {
          Console.WriteLine(string.Format("An error occurred: {0}", ex.Message));
          return false;
     }
      
     //Check for success.
     if (!results.Success)
     {
          Console.WriteLine("An error occurred!");
          Console.WriteLine(results.Message);
          return false;
     }
      
     // STEP 2: Get the Artifact from the read results.
     DTOs.Tab tab = results.Results[0].Artifact;
     Console.WriteLine(">>>" + tab.ToString() + "<<<");
      
     return true;
}

Query for a Tab

This code sample illustrates how to set query conditions, call the Query() method on the Tab repository, and iterate through the result set.

Copy

public static bool Query_Tabs(IRSAPIClient proxy)
{
     // STEP 1: Setup your query criteria.
     DTOs.Query<DTOs.Tab> query = new DTOs.Query<DTOs.Tab>();
     TextCondition parentCriteria = new TextCondition(DTOs.TabFieldNames.LinkType, TextConditionEnum.EqualTo, "Parent");
      
     query.Condition = parentCriteria;
     query.Fields = DTOs.FieldValue.AllFields;
      
     // STEP 2: Call the query method on the Tab Repository.
     DTOs.QueryResultSet<DTOs.Tab> results = null;
     try
     {
          results = proxy.Repositories.Tab.Query(query);
     }
     catch (Exception ex)
     {
          Console.WriteLine(string.Format("An error occurred: {0}", ex.Message));
          return false;
     }
      
     //Check for success.
     if (!results.Success)
     {
          Console.WriteLine("An error occurred!");
          Console.WriteLine(results.Message);
          return false;
     }
      
     // STEP 3: Get the tabs from the query results.
     foreach (DTOs.Result<DTOs.Tab> tabResult in results.Results)
     {
          DTOs.Tab tab = tabResult.Artifact;
          Console.WriteLine(tab.Name + " is a Parent tab.");
     }
      
     return true;
}