Description
The Value property returns the value stored in the cell of the column which is specified by the Column parameter.
Declaration
LogTableRowObj.Value(Column)
| Read-Only Property | Variant | 
| LogTableRowObj | An expression, variable or parameter that specifies a reference to a LogTableRow object | |||
| Column | [in] | Required | A LogColumnobject | |
Applies To
The property is applied to the following object:
Parameters
The property has the following parameter:
Column
A LogColumn object represents the column holding the desired cell.
Property Value
The value stored in the specified cell. It can be an integer or a floating-point number, a string, a boolean, a date-time value, a hyperlink or an image.
| Note: | To determine the type of values in the table column, you can use the LogColumn.DataTypeproperty. | 
Remarks
If you use Python or DelphiScript, you should enclose the parameter of the Value property in square brackets: Value[Column].
You can also obtain the desired value using the ValueByName or ValueByIndex property.
Example
The following example demonstrates how to obtain the value stored in the specified cell.
JavaScript, JScript
{
var Logs, LogItem, LogData, DType, Row, Column, Value;
// Obtains a log item
Logs = Project.Logs;
LogItem = Logs.LogItem(0);
// Obtains the log item’s dataset
LogData = LogItem.Data(0);
DType = LogData.Scheme.DataType;
// Checks whether the dataset corresponds to the table
if (DType == 0)
{
// Obtains a table row by its index
Row = LogData.Rows(0);
// Obtains a table column by its name
Column = LogData.Scheme.ColumnByName("Message");
// Obtains the value stored in the cell
Value = Row.Value(Column);
// Posts the value to the test log
Log.Message(aqConvert.VarToStr(Value));
}
}
Python
def TableDataRowSample():
  # Obtains a log item
  Logs = Project.Logs
  LogItem = Logs.LogItem[0]
  # Obtains the log item's dataset
  LogData = LogItem.Data[0]
  DType = LogData.Scheme.DataType
  # Checks whether the dataset corresponds to the table
  if DType == 0:
    # Obtains a table row by its index
    Row = LogData.Rows[0]
    # Obtains a table column by its name
    Column = LogData.Scheme.ColumnByName["Message"]
    # Obtains the value stored in the cell
    Value = Row.Value[Column]
    # Posts the value to the test log
    Log.Message(aqConvert.VarToStr(Value))VBScript
' Obtains a log item
Set Logs = Project.Logs
Set LogItem = Logs.LogItem(0)
' Obtains the log item’s dataset
Set LogData = LogItem.Data(0)
DType = LogData.Scheme.DataType
' Checks whether the dataset corresponds to the table
If DType = 0 Then
' Obtains a table row by its index
Set Row = LogData.Rows(0)
' Obtains a table column by its name
Set Column = LogData.Scheme.ColumnByName("Message")
' Obtains the value stored in the cell
Value = Row.Value(Column)
' Posts the value to the test log
Log.Message(aqConvert.VarToStr(Value))
End If
End Sub
DelphiScript
var Logs, LogItem, LogData, DType, Row, Column, Value;
begin
// Obtains a log item
Logs := Project.Logs;
LogItem := Logs.LogItem[0];
// Obtains the log item’s dataset
LogData := LogItem.Data[0];
DType := LogData.Scheme.DataType;
// Checks whether the dataset corresponds to the table
if DType = 0 then
begin
// Obtains a table row by its index
Row := LogData.Rows[0];
// Obtains a table column by its name
Column := LogData.Scheme.ColumnByName['Message'];
// Obtains the value stored in the cell
Value := Row.Value[Column];
// Posts the value to the test log
Log.Message(aqConvert.VarToStr(Value));
end;
end;
C++Script, C#Script
{
var Logs, LogItem, LogData, DType, Row, Column, Value;
// Obtains a log item
Logs = Project["Logs"];
LogItem = Logs.LogItem(0);
// Obtains the log item’s dataset
LogData = LogItem["Data"](0);
DType = LogData["Scheme"]["DataType"];
// Checks whether the dataset corresponds to the table
if (DType == 0)
{
// Obtains a table row by its index
Row = LogData["Rows"](0);
// Obtains a table column by its name
Column = LogData["Scheme"]["ColumnByName"]("Message");
// Obtains the value stored in the cell
Value = Row["Value"](Column);
// Posts the value to the test log
Log["Message"](aqConvert["VarToStr"](Value));
}
}
See Also
Access Test Log Contents from Tests
ValueByIndex Property
ValueByName Property
LogColumn Object
