SetSelectedValue

Definition:

SetSelectedValue(control, value)

 

Description:

Select an item within a ListView, List Box or Combo Box Control based on the contents of the item.

 

Platforms:

All

 

Parameters:

control - required

Name of the relevant control.

 

value - required

String containing the text you want to use to match against the items in the control. See Notes below for more information.

 

Returns:

nothing

 

Notes:

  • With ListView Controls this Method looks in the first string-based column and searches for the specified value within that column and, if found, selects the row containing the found value. The order of the columns is as shown in the tree view in the Forms Pane within App Studio.

  • The value parameter must specify the full string to match on, subsets are not allowed. The search is case-sensitive. If the value specified is Null, this will be treated as an empty string.

  • If the value you specify can't be found, the current selection will be cleared and no item will be selected. For Dropdown Combo Boxes the Edit Box will also be cleared.