NextSortOrder

Gets the next available sequential number in the HFMwMbrSel instance’s sort order. This number is always one greater than the highest value that has been set in the dimensions’ order attributes. Use this property when setting a dimension’s order attribute, as nextSortOrder provides a convenient alternative to manually keeping track of dimensions’ order values.

The order attribute applies only when the SortedOnly property is set to TRUE.

Note:

The default value of the order attribute is -1, which indicates the dimension is not included in the sort order.

Read-only.

Example

The following subroutine sets the order attribute for a given dimension. AttrDim gets the dimension’s current order attribute. If the attribute is set to the default of -1, then nextSortOrder sets it to the next number in the sort order.

Sub SetDimensionSortOrder(cMbrSel, nDim)
Dim nSortOrder
nSortOrder = cMbrSel.AttrDim(nDim, WEBOM_MBRSEL_ID_SORTORDER)
' If it's not yet added, put it at the end.
If nSortOrder = -1 Then
   cMbrSel.AttrDim(nDim, WEBOM_MBRSEL_ID_SORTORDER) = _ 
      cMbrSel.nextSortOrder
End If
End Sub