Add elements in an enum with code

Hi, I think it’s an easy question but I don’t know how to do… I have created a base enum and I would like to put new elements in this enum using code. I’d like to fill this enum with the custGroup of the clients because I’d like to create a form with a combo box that displays all the existing custGroup. At the end, the user just wil have to choose a custGroup and a report will be generated. Thanks, Vince

if I understood the task right, I think you are going the wrong way. You should simple use an unbound ComboBox (AutoDeclaration = true) and fill it on init with all needed custGroups: //FormComboBoxControl box; //you don’t need to declare a variable, because it is autodeclared - name of the variable = name of the control. box.add(“CustGroup”); and loop this add() for all custGroups then select the result box.getText(box.selection()); and if you need just custGroups, why not put a StringEdit with EDT set to CustGroup?? It will have a lookup of custGroups

As usual, thanks Ivan .[:D]