newbie - peoplecode to limit data entered into numeric field.
I am trying to set the field up to only accept numbers with a length of 4. I have the following peoplecode on the record field Sequence_5. But when I go to the page to input data it doesn't stop me from entering only 1 digit. Can someone help me?
If IsNumber(SCH_STR_AUD_ACT.SEQUENCE_5) Then
If SCH_STR_AUD_ACT.SEQUENCE_5 >= 1 And
SCH_STR_AUD_ACT.SEQUENCE_5 <= 9999 Then
Else
Error MsgGet(20008, 3, "The Sequence should be 4 digits long.");
End-If;
Else
Error MsgGet(20008, 4, "Sequence must be numeric");
End-If;