This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
CLEAR LIST
|
CLEAR LIST ( list {; *} ) | ||||||||
Parameter | Type | Description | ||||||
list | ListRef |
![]() |
List reference number | |||||
* |
![]() |
If specified, clear sublists from memory, if any. If omitted, sublists (if any) are not cleared. | ||||||
The CLEAR LIST command deletes the hierarchical list whose list reference number you pass in list.
Usually you will pass the optional * parameter, so all the sublists, if any, attached to items or subitems of the list will be deleted as well.
You do not need to clear a list attached to a form object via the Property List window. 4D loads and clears the list for you. On the other hand, each time you load, copy, extract from a BLOB, or create a list programmatically, call CLEAR LIST when you are through with the list.
To clear a sublist attached to an item (on any level) of another list currently displayed in a form, proceed as follows:
Within a clean-up routine that clears all objects and data that you no longer need (i.e., when a window is closed and a form unloaded), you may end up clearing a hierarchical list that may have already been cleared, depending on the user actions within the form. Use Is a list to clear the list only if necessary:
` Extract of clean-up routine
If(Is a list(hlList))
CLEAR LIST(hlList;*)
End if
See example for the Load list command.
See example for the BLOB to list command.
Product: 4D
Theme: Hierarchical Lists
Number:
377
Created: 4D v6
4D Language Reference ( 4D v20 R7)