cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Dear Experts,

We have the requirement where we need to check if input in a extension field of type LANGUAGEINDEPENDENT_EXTENDED_Text contains characters other than the numbers. These other characters can be special characters, digits Etc.

If yes then it should not let the screen to save. For this I know we will have to use regular expression. But I don't know how to do the same and design the regular expression of such kind. Please help!

Regards,

Pragati Verma

0 Likes
View Entire Topic
marlosdamasceno
Participant

Hi Pragati,

You may use the Validation: OnSave event of your object to do this validation. There you can use this code:

if(this.yourField.FindRegex("[^[:digit:]]") >= 0) {
     raise Message.Create("E", "You should use only numbers!");
     return false;
}

If your field was created by screen you may get it using the References to Customer-Specific Fields.


Best regards

Marlos Damasceno