PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Operating mode of FileToMemoryList
  • Modifying the properties associated with the List Box control
  • Miscellaneous
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
FileToMemoryList (Function)
In french: FichierVersListeMémoire
Populates a List Box or Combo Box control programmatically with the records from a data file or query. The List Box or Combo Box control is not cleared before being populated with the content of the data file or query.
Example
// Add the "<None>" element to the List Box control named "LIST_Customer"
// When the user selects this element,
// the value "-1" will be returned
ListAdd(LIST_Customer, "<None>" + gStoredValue("-1"))
// Add after the "<None>" element,
// the names of the customers found in "CUSTOMER" file
FileToMemoryList(LIST_Customer, CUSTOMER, NAME, NAME, CUSTOMERID)
Syntax
FileToMemoryList(<List Box control> [, <File name> [, <Name of displayed item> [, <Name of sort item> [, <Name of stored item>]]]])
<List Box control>: Character string
Name of the List Box or Combo Box control to be populated.
<File name>: Optional character string
Name of data file (or query) used. If this parameter is not specified, the name of the data file used corresponds to the one specified when creating the control ("Content" tab in the description window of control).
Content tab of control
<Name of displayed item>: Optional character string
Name of the data file (or query) item that will be displayed in the List Box or Combo Box control.
If this parameter is not specified, the name of displayed item corresponds to the one specified when creating the control ("Content" tab in the description window of control).
If this parameter is not specified and if the "Content" tab is not filed, the displayed item corresponds to:
  • the last item used in the data file.
  • the first column of query.
<Name of sort item>: Optional character string
Name of item used to sort the elements in the List Box or Combo Box control. If this parameter is not specified, the name of the sort item will be the one specified when the control was created ("Content" tab in the control description window).
<Name of stored item>: Optional character string
Name of the item that will be used in the code when an element is selected in the List Box or Combo Box control.
If this parameter is specified, the value added in the List Box or Combo Box control is:
<Name of displayed item> + gStoredValue(<Name of stored item>)

If this parameter is not specified, <Name of stored item> corresponds to <Name of displayed item>.
PHP This parameter is ignored because List Box and Combo Box controls populated programmatically do not have stored values in PHP.
Remarks

Operating mode of FileToMemoryList

FileToMemoryList populates the List Box control with all the records from <File name> sorted by <Name of the sort item>. If a filter is found on this item, this filter is taken into account.

Modifying the properties associated with the List Box control

The following properties are modified by this function:

Miscellaneous

  • The List Box (or Combo Box) control is not cleared before being populated.
  • This function cannot be used on a Table control: It is recommended to use FileToMemoryTable.
Component: wd270obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment