override edit property of a field in a form

Hi all, I have a select box (among other fields) in a form which is bound to a table. On meeting certain conditions, I am disabling the table datasource ‘Edit’ property by code. Like this - <Table_Name_ds>.allowEdit (false); After the above line, now I want to enable allow edit property of the selectbox in this form. I tried various ways including directly calling the field property (.allowedit) and also using FormDataObject class. But not able to achieve the desired result. Can some one help me please. Thanks in advance, Harish Mohanbabu

Hi, The FormDataObject class does not work explicitly as you tried because it seems that allowedit on the datasource is at a lower level compared with analog from datasource’s fields. Meaning that it can be true on the field, but if the entire ds in false, the field would not be editable. A solution would be to use DictTale, DictField and FormDataObject classes and replace the <Table_Name_ds>.allowEdit (false); with this procedure: FormDataObject obj; DictTable dt = new DictTable(tablenum(ActivityParameters)); DictField df; Int i; ; for (i=1;i<=dt.fieldCnt();i++) { df = new Dictfield(tablenum(ActivityParameters),dt.fieldCnt2Id(i)); if (!df.isSystem()) { obj = activityparameters_ds.object(dt.fieldCnt2Id(i)); obj.allowEdit(false); } } Then you can use successfully use again the FormDataObject class. Hope this helps, Ciprian