Tech Tip: Retrieving the text of the selected list item
PRODUCT: 4D | VERSION: 2003.1 | PLATFORM: Mac & Win
Published On: September 10, 2003
Versions 6.7.x, 6.8.x and 2003.x
Here is a simple project method that returns the text of the selected list item as the function result.
` Method: Get_SelectedListItemText
C_LONGINT($1) ` List Reference Number
C_LONGINT($listpos;$listpos;$itemRef;$subList)
C_TEXT($0;$itemText)
C_BOOLEAN($expand)
$listpos:=Selected list item($1)
GET LIST ITEM($1;$listpos;$itemRef;$itemText;$subList;$expand)
$0:=$itemText
Here is an example of how this method can be called:
$itemText:=Get_SelectedListItemText ($ListReference)