How to define a list box in camunda form from fields

The field LEAVEREQTYPE can be:
V = vacation
S = sick
B = Banked time

please help

you can use Enum as field type and enter the values you want to be visible in dropdown.

1 Like

That works, thanks!

now I need to extract selected value using groovy script.

in a script task of camunda, add the following script:

l_typeid = execution.getVariable(“LEAVEREQTHYPE”).toString();
switch (l_typeid) {
case “Value_vacation”:
l_type = “V”;
break;
case “Value_sick”:
l_type = “S”;
break;
case “Value_banktime”:
l_type = “B”;
break;
default:
// this should not happen since drop down list only 3 values
l_type = “?”;
break;
}