GetFreeElementPosition (return free key element position)

Top  Previous  Next


GetFreeElementPosition, PROTECTED, VIRTUAL

The GetFreeElementPosition method returns the position of the first sort field in the active sort order that is not limited to a single value by the applied range limit. For example, consider a VIEW sorted by Customer, Order, and Item, with the Customer field range limited to its current value. The free element is the Order field. But remove the range limit, and the free element is the Customer field.

The AddSortOrder method sets the key/sort order for the VIEW. The SetSort method sets the active sort order. The AddRange method adds range limits.


The BrowseClass.TakeKey method uses the GetFreeElementPosition method to reposition the VIEW based on the fixed key elements. The GetFreeElementName method uses the GetFreeElementPosition method to find the free element name.

Return Data Type:     BYTE


BrowseClass.TakeKey PROCEDURE


!method code

IF SELF.Sort.Locator.TakeKey()

 Handled = 1




 SELF.ListControl{PROP:SelStart} = SELF.CurrentChoice


See Also:     GetFreeElementName, BrowseClass.TakeKey