DataObject.GetRoleVar

Prototypes

String GetRoleVar( int nRole )

Return Value

The return value is a reference to a String object containing the name of the variable in the specified role. If no variable has the specified role, the returned string is empty.

Parameters

int nRole
A predefined constant specifying the role. The valid values are ROLE_LABEL, ROLE_FREQ, and ROLE_WEIGHT. The constant ROLE_LABEL specifies the label variable, the constant ROLE_FREQ specifies the frequency variable, and the constant ROLE_WEIGHT specifies the weight variable.

Remarks

This method returns the name of the variable in a role.

Example
declare DataObject dobj;
dobj = DataObject.CreateFromFile( "baseball" );
dobj.SetRoleVar( ROLE_LABEL, "team" );
DataTable.Create( dobj ).ActivateWindow();
LabelVar = dobj.GetRoleVar( ROLE_LABEL );
print LabelVar;
See Also

DataObject.SetRoleVar