GetFreeElementName (return free key element name)

Top  Previous  Next



The GetFreeElementName method returns the fully qualified field name 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 FilterLocatorClass uses the GetFreeElementName method to refresh the window.

Return Data Type:     STRING


BuildFilter PROCEDURE(STRING filter)

FieldName  CSTRING(100)


FieldName = MyView.GetFreeElementName()              !get filterable field name

MyView.SetFilter(FieldName&'[1] = '''&filter[1]&'''')!set a filter expression

MyView.ApplyFilter()                                 !apply the filter expression

See Also:     AddRange, AddSortOrder, SetSort