Skip to content

Is it possible to restrict a numeric custom field so it rejects negative values entered by the user?

Answer

Yes — define a custom Event that fires on insert/update for the field, with online SQL logic checking the new value and raising a validation error if it's negative — for example: BEGIN IF (&NEW:CF$_YourField < 0) THEN IFSAPP.ERROR_SYS.Record_General('YourLU','The input value can't be negative. Please adjust the value entered before saving.'); END IF; END; This blocks the save with a clear error message whenever a negative value is entered, giving you field-level numeric validation that isn't available as a built-in custom field constraint.

← Browse Developer Studio, deployment, and upgrades questions