היי,
בשדה עיר במסך לקוחות רציתי לדעת איך אני יכולה לחסום רישום של ערים אשר לא נמצאים במסך ערים?
ובנוסף, מכיוון שבטבלת ערים יש לעדכן את העיר ואת הארץ אז בחיפוש הוא מחפש לפי הארץ ולא לפי העיר, איך אני יכולה להפוך את זה?
CHECK-FIELD
CHECK-FIELD triggers perform verification checks on the value specified for a column. Note that the value must have been inserted or updated by the user. The check will not be performed if the user simply moves the cursor through this column, without making any changes in it (even if the value was filled in by a trigger after record retrieval).
CHECK-FIELD triggers should be used when you wish to restrict the values that may be specified (in addition to the validation checks built into the system). The error/warning message is specified in the sub-level form (Error and Warning Messages). It should be assigned a number greater than 500.
Example 1: The CHECK-FIELD trigger for the TYPE column of the PART form is: ERRMSG 4 WHERE :$.TYPE NOT IN ('O','R','P');
This trigger restricts the part type to O,R, or P. If any other value is specified, the user will not be able to exit the column, and an error message will be generated: “Specify P (part), R (raw material) or O (other).”
Example 2: The CHECK-FIELD trigger for the TQUANT column of the ORDERITEMS form warns the user if the quantity specified in the current column of the current form is less than zero (“The designated quantity is a negative number!”):
WRNMSG 105 WHERE :$.@ < 0;