I would musk the serial number of items. Because of item variety in our inventoru, there is many formats for serial numbers. So, I would oblige each user to enter the right serial numbers.
1. Declare Tmp -> Local TEMPORARY Record variable. same type as Rec
2. Add this code to the following table triggers:
On Insert & On Modify
Tmp := Rec;
Tmp.FILTERGROUP(1);
Tmp.SETFILTER(Code, '??'); //allows only 2 chars in "Code" field
Tmp.FILTERGROUP(0);
Tmp.INSERT;
IF Tmp.COUNT = 0 THEN ERROR ('insert correct format');
"Simplicity is the ultimate sophistication."
Leonardo DaVinci
Comments
Record.FILTERGROUP(1);
Record.SETFILTER(fieldToBeMasked, filterMask);
Record.FILTERGROUP(0);
It is quite restrictive, though... Depends on what you're trying to mask.
Leonardo DaVinci
2. Add this code to the following table triggers:
On Insert & On Modify
Leonardo DaVinci
For primary key field: OnInsert & OnRename
Leonardo DaVinci