If I have understood your requirement., I believe you need to subtract the current row from the expression. I believe you may need an expression something like below
Please take a look at section " Preventing Duplicate Field Values" in the following article
However , please note that this duplicate prevention logic could fail in multiuser environment.
please note that this duplicate prevention logic could fail in multiuser environment
Very true.
@sayan, just to be clear, a key value must be unique within the entire column of the table, not just for a particular Farmer column value. If VID is the table’s key column, no two farmers can have the same VID value. Your expression may very well ensure a VID value is unique for a Farmer, but it doesn’t check for duplication of another farmer’s VID. The error appears to be telling you it duplicates another Farmer’s VID.