Q

Restrict a field to only 100 characters

I want to restrict a field to only 100 characters. For example, the Summary of Change field... There should not

be more than 100 characters when user provides a brief summary. Is it do-able?

The easiest way would be to use an input validation formula like the following...
@If( @Length(fieldName) > 100 ; @Failure("Field too long, blah blah blah") ; @Success );

Only problem with that approach is that the user will be alerted when they try to save the document instead of when they are editing the field.

Using LotusScript and the field's exiting event, you could also check with something like the following...

Dim workspace as New NotesUIWorkspace
Dim uidoc as NotesUIDocument
Set uidoc = workspace.CurrentDocument
If len( clng(iudoc.FieldGetText( "fieldname" ) ) ) > 100 then
     Msgbox "Failed", 0, "Failure"
     Uidoc.GotoField( "fieldname" )
End if

Note: If the field the user goes into has an exiting event that also puts the cursor in another field, you could have trouble (i.e. the exiting events could be fighting over where to put the cursor)

You could also use Javascript to check as you type. If you're not familiar with JavaScript, go to javascripts.com and you'll find samples.


This was first published in January 2002

Dig deeper on Lotus Notes Domino Administration Tools

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.uk

Close