GetSelectedText
Definition:
GetSelectedText(control)
Description:
Obtain the value of the currently selected item in a Combo Box, List Box or ListView Control.
Platforms:
All
Parameters:
control - required
Name of the control.
Returns:
The string value of the currently selected item or an empty string, "", if the control is empty.
For Dropdown Combo Boxes, an empty string will also be returned if the value in the Edit Box doesn't match any of the values in the predefined list of values.
For a ListView, this Method returns the value of the first control in the currently selected row.
(Note that when viewing a Template in the Forms Pane tree within App Studio, by default the Panel defining the boundaries of the row appears as the first control listed. This control is ignored by GetSelectedText when determining the first control in the row.)
Notes:
-
The currently selected row in a ListView Control is automatically set to be the current record, you do not need to call SelectRecord.
Note that if the Show Selection in Touch Mode Property for this control is set to False, the currently selected row within a ListView will not be highlighted on the actual display.
-
If you have used input Data Conversion to modify the value displayed in a control, the value returned here will be the converted value displayed in the control and not the original input value.