Validate range

Hi All,

I have one table with three fields Code, fromWeight and toWeight.

I want a validation in order to prevent overlapping of fromWeight and Toweight range.

Please Help.

Hello Moumita,

You want fromWeight should not be greater than Toweight validation or something else?




I want to prevent the following case :

Code FromWeight toWeight
C001 1 10
C002 11 20
C003 2 5
C004 9 15

Hi Moumita,

u can write like this

public boolean validateWrite()


boolean ret;

if (this.Fromweight< weight)

ret = super();


info(" ----error message---- ");

return ret;