Share via


RecordSortedList.sortOrder(Int32, Object[]) Method

Definition

Defines the fields on which the records are sorted.

public:
 virtual void sortOrder(int _fieldId, cli::array <System::Object ^> ^ objArray1);
public virtual void sortOrder (int _fieldId, object[] objArray1);
abstract member sortOrder : int * obj[] -> unit
override this.sortOrder : int * obj[] -> unit
Public Overridable Sub sortOrder (_fieldId As Integer, objArray1 As Object())

Parameters

_fieldId
Int32
objArray1
Object[]

Remarks

You can specify one or more fields to sort on. This method can only be called one time on the same instance of the RecordSortedList class. You cannot change the sorting order after it has been set.

The following example creates a list of DimensionSetRuleTable table records, and then sorts them by the SetId field, and then by the HierarchyId field.

static RecordSortedList initRulesList() 
{ 
    RecordSortedList list; 
    list = new RecordSortedList(tablenum(DimensionSetRuleTable)); 
    list.sortOrder( 
        fieldnum(DimensionSetRuleTable, SetId),  
        fieldnum(DimensionSetRuleTable, HierarchyId)); 
    return list; 
}

Applies to