Filterring of BaseEnum based on condition

Hi guys…

I want to filter the BaseEnum ‘DocumentStatus’ based on a given purchase order’s PurchStatus on a dialog. My requirement is explained as follows…

If selected purchase order’s purchstatus is ‘Received’ then the combobox displaying documentstatus should show only ‘Invoice’ as its entry.

I am awaiting your help on the above issue.

Thanking you in advance,


Hi , You can use dialogSelectCtrl() method os RunBase class to accomplish this task. Here is the Complete code description. class dialogTest extends RunBase { DialogField dialogFieldPurchStatus; DialogField dialogFieldDocStatus; } public container pack() { return conNull(); } public boolean unpack(container packedClass) { return true; } static void main(args _args) { dialogTest dialogTest = new dialogTest(); ; dialogTest.prompt(); } protected DialogRunBase dialog() { DialogRunBase dialog = super(dialog, true); ; dialogFieldPurchStatus = dialog.addField(typeId(PurchStatus)); dialogFieldDocstatus = dialog.addField(typeId(DocumentStatus)); dialog.allowUpdateOnSelectCtrl(true); return dialog; } public void dialogSelectCtrl() { super(); if(dialogFieldPurchstatus.value() == PurchStatus::Received) { dialogFieldDocStatus.value(DocumentStatus::Invoice); } } This works I really tested it. Furthermore you can modify the code according to your requirement. Somvir