Description
The ObjectName
property specifies the full name of the object or control, whose data will be compared with the data stored in the Table project element that corresponds to the Table object. By default, this is the name of the object, from which the data was retrieved when the element was created or updated with the Select Table wizard (that is, the same string that is displayed in the Object edit box on the first page of the wizard).
The object specified by the ObjectName
property is used when you perform the comparison with the Table.Compare
method.
Declaration
TableObj.ObjectName
Read-Only Property | String |
TableObj | An expression, variable or parameter that specifies a reference to a Table object |
Applies To
The property is applied to the following object:
Property Value
String that specifies the full name of the desired object.
Example
The following code snippet obtains the name of the object whose data will be compared with data stored in the Table element, posts the name to the test log and performs the comparison.
JavaScript, JScript
{
var Table, TableName, ObjectName;
// Obtains the Table object
Table = Tables.OrdersTable;
// Obtains the Table element’s name
TableName = Table.Name;
// Obtains the name of the object whose data will be compared with data stored in the Table element
ObjectName = Table.ObjectName;
// Posts the Table element’s name and the object’s name to the test log
Log.Message("The " + TableName + " element will be compared with the " + ObjectName + " object.");
// Performs the comparison
Table.Compare(true, lmError);
}
Python
def Test():
# Obtains the Table object
Table = Tables.OrdersTable
# Obtains the Table element's name
TableName = Table.Name
# Obtains the name of the object whose data will be compared with data stored in the Table element
ObjectName = Table.ObjectName
# Posts the Table element's name and the object's name to the test log
Log.Message("The " + str(TableName) + " element will be compared with the " + str(ObjectName) + " object.");
# Performs the comparison
Table.Compare(True, lmError)
VBScript
Dim Table, TableName, ObjectName
' Obtains the Table object
Set Table = Tables.OrdersTable
' Obtains the Table element’s name
TableName = Table.Name
' Obtains the name of the object whose data will be compared with data stored in the Table element
ObjectName = Table.ObjectName
' Posts the Table element’s name and the object’s name to the test log
Log.Message("The " & TableName & " element will be compared with the " & ObjectName & " object.")
' Performs the comparison
Call Table.Compare(True, lmError)
End Sub
DelphiScript
var Table, TableName, ObjectName;
begin
// Obtains the Table object
Table := Tables.OrdersTable;
// Obtains the Table element’s name
TableName := Table.Name;
// Obtains the name of the object whose data will be compared with data stored in the Table element
ObjectName := Table.ObjectName;
// Posts the Table element’s name and the object’s name to the test log
Log.Message('The ' + TableName + ' element will be compared with the ' + ObjectName + ' object.');
// Performs the comparison
Table.Compare(true, lmError);
end;
C++Script, C#Script
{
var Table, TableName, ObjectName;
// Obtains the Table object
Table = Tables.OrdersTable;
// Obtains the Table element’s name
TableName = Table["Name"];
// Obtains the name of the object whose data will be compared with data stored in the Table element
ObjectName = Table["ObjectName"];
// Posts the Table element’s name and the object’s name to the test log
Log.Message("The " + TableName + " element will be compared with the " + ObjectName + " object.");
// Performs the comparison
Table["Compare"](true, lmError);
}