Skip to Content
avatar image
Former Member

Validation on extension field for numeric input -Regular expression

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 05 at 07:43 AM

    Hi Pragati,

    Did you complete your requirement ?

    As i have the same requirement and need you help on how did you achieve this.

    Regards,
    Srikanth Rathod

    Add comment
    10|10000 characters needed characters exceeded