[Deprecated] - getStringFromDropdown( )

Convert selected drop-down choice labels into a comma-separated string.

Note:

As this function is deprecated, we recommend you use getStringFromChoice( ) instead, which is used for the same purpose and supports all choice-type controls. However, rules that call getStringFromDropdown() can still work when used with drop-downs.

Syntax

getStringFromDropdown(variable)

Parameters

Parameter Required/Optional Description
variable Required Rule variable, corresponding to a drop-down value, that you want to retrieve.

Return value

This function returns a comma-separated string with the labels of the selected drop-down options. If no values are selected it returns an empty string.

Examples

Example 3-87 Given a drop-down dd with labels "Yes" and "No" selected

// return all selected labels from dropdown
return getStringFromDropdown(dd2);
 
 
// if single label is selected, returns "label1"
// If multiple labels are selected, returns "label1,label2"