How to filter elements of an enum of a bound control on form???

Hi all,

I want to filter the elements of an enum control on form which is a datasource field.

I know, we can do that in 2009 using SysFormEnumComboBox class.

But I dont understand, what i m missing in my code, as it is not working for me…

Here’s my code in init method of form…

public void init()
{

Set allowedValues = new Set(Types::Enum);
;

allowedValues.add(ProdStatus::CostEstimated);
allowedValues.add(ProdStatus::Released);
allowedValues.add(ProdStatus::StartedUp);

SysFormEnumComboBox::newParameters(element, Control::ProductionOrder_ProdStatusPurch, enumNum(ProdStatus), allowedValues);

super();
}

Here , “ProductionOrder_ProdStatusPurch” is the name of my control, which is of enum type, ProdStatus.

Can we use that filtering of elements on a bound control also…if not, what we hav other option to do the required task???

Thanks in advance…

Regards

Hi Manish,

See whether this helps - http://kashperuk.blogspot.com/2008/04/sysformenumcombobox-class-allowing-to.html

Regards,