Description
The Name property returns the name of the dataset described by the given scheme. Usually, the dataset’s name is the caption of the log panel which holds the dataset, for example, Details or Connections.
Declaration
ProgObj.Name
| Read-Only Property | String | 
| ProgObj | An expression, variable or parameter that specifies a reference to one of the objects listed in the Applies To section | |||
Applies To
The property is applied to the following objects:
Property Value
The string holding the dataset’s name.
Example
The code below obtains the name of the specified dataset.
JavaScript, JScript
function LogData()
						{
  // Obtains a collection of logs
  var LogsCol = Project.Logs;
  // Obtains the first log item
  var LogItem = LogsCol.LogItem(0);
  // Obtains the first dataset
  // of the specified log item
  var LogData = LogItem.Data(0);
  // Obtains the scheme of the dataset
  var Sch = LogData.Scheme;
  // Obtains the name of the first dataset
  // and posts it to the test log
  var Name = Sch.Name;
  Log.Message("The first dataset's name is: " + Name);
						}
Python
def LogData():
  # Obtains a collection of logs
  LogsCol = Project.Logs
  # Obtains the first log item
  LogItem = LogsCol.LogItem[0]
  # Obtains the first dataset
  # of the specified log item
  LogData = LogItem.Data[0]
  # Obtains the scheme of the dataset
  Sch = LogData.Scheme
  # Obtains the name of the first dataset
  # and posts it to the test log
  Name = Sch.Name;
  Log.Message("The first dataset's name is: " + Name)VBScript
Sub LogData()
  ' Obtains a collection of logs
  Set LogsCol = Project.Logs
  ' Obtains the first log item
  Set LogItem = LogsCol.LogItem(0)
  ' Obtains the first dataset
  ' of the specified log item
  Set LogData = LogItem.Data(0)
  ' Obtains the scheme of the dataset
  Set Sch = LogData.Scheme
  ' Obtains the name of the first dataset
  ' and posts it to the test log
  Name = Sch.Name
  Log.Message("The first dataset's name is: " & Name)
  
End Sub
DelphiScript
function LogData;
var LogsCol, LogItem, LogData, Sch, Name;
begin
  // Obtains a collection of logs
  LogsCol := Project.Logs;
  // Obtains the first log item
  LogItem := LogsCol.LogItem(0);
  // Obtains the first dataset
  // of the specified log item
  LogData := LogItem.Data(0);
  // Obtains the scheme of the dataset
  Sch := LogData.Scheme;
  // Obtains the name of the first dataset
  // and posts it to the test log
  Name := Sch.Name;
  Log.Message('The first dataset''s name is: ' + Name);
end;
C++Script, C#Script
function LogData()
						{
  // Obtains a collection of logs
  var LogsCol = Project["Logs"];
  // Obtains the first log item
  var LogItem = LogsCol["LogItem"](0);
  // Obtains the first dataset
  // of the specified log item
  var LogData = LogItem["Data"](0);
  // Obtains the scheme of the dataset
  var Sch = LogData["Scheme"];
  // Obtains the name of the first dataset
  // and posts it to the test log
  var Name = Sch["Name"];
  Log["Message"]("The first dataset's name is: " + Name);
						}
See Also
Access Test Log Contents from Tests
Child Property
ChildCount Property
DataType Property
