User Tools

Site Tools


getfreeelementposition_return_free_key_element_position_.htm
Navigation:  ABC Library Reference > ViewManager > ViewManager Methods >====== GetFreeElementPosition (return free key element position) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

GetFreeElementPosition, PROTECTED, VIRTUAL

blk2blue.jpg

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.

Implementation:

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

Example:

BrowseClass.TakeKey PROCEDURE

!method code

IF SELF.Sort.Locator.TakeKey()

 Handled = 1

 SELF.Reset(SELF.GetFreeElementPosition())

 SELF.ResetQueue(Reset:Done)

ELSE

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

END

See Also:     GetFreeElementName, BrowseClass.TakeKey

getfreeelementposition_return_free_key_element_position_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1