KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to populate records in a list box based on selection
PRODUCT: 4D | VERSION: 11.4 | PLATFORM: Mac & Win
Published On: August 13, 2009
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

Specifying the selection for a list box based on the current selection is not enough to populate the records in the list box colums. For example, we have a list box based on the Current selection. Our current selection is all records in the table named "People Names":



We have a list box named "List Box" using "Current Selection" as the data source, and People Names as the Master Table:



But displaying the form still gives you empty columns:



The data source for list box columns is Undefined. That's why displaying the form will not populate the records in the list box columns. To be able to see the selection, we need to define the data source for each column:



Select the column. In the property list for the selected colum click on the dotted button for the Expression data source option and select the First field and then click on OK:



We will repeat the same steps for the second column or for every column that we want to be displayed. The column's data source will be changed from undefined to the chosen field:



Now when displaying the form all records from the current selection will be populated in the list box: