|
|
This assumes you have a field named CompanyCode as an editable field. It also assumes that you have a view called "Company Code" which has CompanyCode column.
Use the following input validation formula for CompanyCode:
@If(
CompanyCode = "";
@Failure("You have to fill in Company Code");
@IsError(
@DbLookup("" : "NoCache"; ""; "Company Code"; CompanyCode; CompanyCode));
@Success;
@IsNewDoc = 0;
@Success;
@Failure("The company code you entered has already exist, please change it")
)