| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ViewManager > ViewManager Methods >====== GetFreeElementName (return free key element name) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[getfirstsortfield return first field of current sort .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[getfreeelementposition return free key element position .htm|{{btn_next_n.gif|Next page}}]] | | || **GetFreeElementName** {{blk2blue.jpg|blk2blue.jpg}} 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. **Implementation:** The FilterLocatorClass uses the GetFreeElementName method to refresh the window. **Return Data Type:     **STRING **Example:** **BuildFilter PROCEDURE(STRING filter)** **FieldName  CSTRING(100)** ** CODE** ** 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 add a range limit .htm|AddRange]], [[addsortorder add a sort order .htm|AddSortOrder]], [[setsort set the active sort order .htm|SetSort]]