Number Validation

Hi,

I want to validate the field in Lotus script to enter the field value only numeric values only. How to do this

can anybody help me

srini

Subject: Number Validation

You could try the isNumeric function:

http://www-12.lotus.com/ldd/doc/domino_notes/6.5.1/help65_designer.nsf/855dc7fcfd5fec9a85256b870069c0ab/90a3bc29bcdd2e8685256e00004a26ad?OpenDocument

Frunobulax

Subject: RE: Number Validation

@IsNumber( value ) will help you in your validation.

Subject: Number Validation

This code in LS check two things:

When the field is blank

When the field do not have only numeric characters

It work properly in the QuerySave event

Good look !!

Antonio Peinado

Code

Dim v as NotesItem

Set v = doc.GetFirstItem(“Y1ReasonCreditNoteAmount”)

 'Is empty ?
 If Len(v.text) = 0 Then
      .../...

 continue = False

 Exit sub
 End If
 

 'Is not numeric ?
 For i=1 To Len(v.text)
      If Not Mid(v.text,i,1)  Like  "[0-9]" Then
           .../...
           continue = False

           Exit sub
      End If
 Next