[Deprecated] - getArrayFromDropdown( )

Convert the selected drop-down choice labels into an array.

Note:

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

Syntax

getArrayFromDropdowm(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 an array with the labels of the selected drop-down options. If no values are selected it returns an empty array.

Examples

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

// Return the first selected label from dropdown item dd:
return getArrayFromDropdown(dd2)[0];
// returns "Yes"
 
// Return the second selected label from dropdown item dd:
return getArrayFromDropdown(dd2)[1];
// Returns "No"