Checking if a certain value has been selected in a choice field (‘IsSlected’)

The following built-in system function will check to see if Value1 has been selected within a choice field:

if ( fld('FieldName_cho').IsSelected('Value1') ) {
// DO THIS
}

This will work with the following fields:

  • Checkboxes
  • Radios
  • Dropdown lists
  • List
  • Yes/No

The more traditional way to check for the value is to use the “indexOf” Javascript function as follows:

if (fld('FieldName_cho').CheckedValue().indexOf('Value1') !== -1) ) { 
// DO THIS
}