Edit

GetListContents (listRef [, getWhat] [, bAsSelection])

Definition:  Gets the current contents of a list instantiated with InsertListObject or InsertEditListObject.

For a selectable list object, if `getWhat` (1) is `ListSelectedOnly`, only the highlighted rows are returned.

if `getWhat` is `ListHeader` (2) the list header is returned (this includes not just the headings, but metadata indicating the column widths etc — this header can be reused for instantianting a custom list with columns widths that the user may have customised).

In MoneyWorks 9.1.4 and later, if the list is a list of database records, passing ListAsSelection (1) for both `getWhat` and `bAsSelection` will cause the function to return the highlighted records as a selection instead of as tab-delimited text.

You can also use this function with lists that are part of the standard MoneyWorks user-interface, not just custom lists.

Availability:  available within MWScript handlers.

See Also:

InsertListObject: Initialise selectable list object in a window

SetListSelect: Highlight a row in a list

SetOptionsForEditList: Set options for the list