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

SearchWindowsServer
Search400
  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

SearchDataCenter
SearchContentManagement
Close