DataObject.GetVarSortMode

Prototypes

int GetVarSortMode( String sVarName )

Return Value

The return value is an integer identifying the sort mode for the specified variable in the DataObject. The predefined constants for the sort modes are SORTMODE_STANDARD, SORTMODE_FREQ, SORTMODE_FORMATTED, SORTMODE_DATA, SORTMODE_FREQRAW, and SORTMODE_DATARAW. If the variable has been assigned a custom ordering using the method DataObject.SetVarValueOrder, the return value is -1.

Parameters

String sVarName
The name of the variable whose sort mode you want to retrieve.

Remarks

This method returns the sort mode for a variable. For information about sort modes, see DataObject.SetVarSortMode.

Example
declare DataObject dobj;
x = { "Low", "Medium", "Medium", "High", "High", "High" };
dobj = DataObject.Create( "Example", "X", x );
values = { "Low", "Medium", "High" };
dobj.SetVarSortMode( "X", SORTMODE_FREQ );
BarChart.Create( dobj, "X" );
sortmode = dobj.GetVarSortMode( "X" );
if sortmode = SORTMODE_FREQ then
    print "Sorted by frequency";
See Also

DataObject.SetVarSortMode