Hello,
I want to set field to mandatory depending on other field. It is working well, the only problem I face is when currently marked row is with value that couse my field to be mandatory. When I just go with the mouse pointer thru same field on the others rows ( I am not clicking on other rows, just point to them) the field changes his mandatory property to true also. If I click on row that should not be mandatory and goes again thru all rows the red line (for mandatory) is gone. I was thinking about something like comment super() in method that respond for moving mouse over the field but I cant find the exact method. Could you suggest anything else?
The code I use is:
public int active()
{
int ret;
ret = super();
if (expression)
{
datesource_ds.object(fieldNum(datesource, RefItemId)).mandatory(false);
datesource_ds.object(fieldNum(datesource, RefItemId)).allowEdit(false);
}
else
{
datesource_ds.object(fieldNum(datesource, RefItemId)).mandatory(true);
datesource_ds.object(fieldNum(datesource, RefItemId)).allowEdit(true);
}
return ret;
}
Thank You!
*This post is locked for comments