Smooth Input Validation using Formulas (as an alternative to LotusScript)

Using input validation formulas on fields [for example: @If(Field1!=NULL;@Success;@Failure("Please answer Question #1."))] works fine unless dBLookups are involved. Then, immediately after the lookup, a field validation dialog box will display. This makes the process of filling out a form a bit bumpy for the user. Using LotusScript on a "Save" or "Submit" action button, can make this process smoother, because validation doesn't start until the button is clicked. The following formulas can accomplish the same goals as LotusScript. The example below is from a form that has workflow with the document going through various statuses (Submitted, Manager Approved, etc.)


First, you'll want to create a "NoSaves" hidden field and then click on Formula selection in the design pane and at the "Input Validation Event" type the following formula to force users to use the "Submit" action button: @If(@IsDocBeingSaved & Status= NULL;@Failure("This document cannot be saved. Please click either the SUBMIT button or the CLOSE/DO NOT SAVE button on the action bar above."); @Success)

Then, create a "Submit" button with the following code:

@Command([EditDocument]; "1"); @If (Field1!=NULL;"";@Command([EditGotoField];"Field1")); @If (Field1!=NULL;"";@Return(@Prompt([OK]; "Field 1 Information Needed!"; "Please fill out Field1. " ))); @If (Field2!=NULL;"";@Command([EditGotoField];"Field2")); @If (Field2!=NULL;"";@Return(@Prompt([OK]; "Field 2 Information Needed!"; "Please fill out Field2. " )));

FIELD Status:= "Submitted"; @Command([FileSave]);

(MailSend code goes here....);

@Prompt([OK] ; "Your order has been submitted to....";ManagerField);

@PostedCommand([FileSave]); @Command([FileCloseWindow])

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

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 ...

SearchDataCenter

SearchContentManagement

Close