This validation formula will check all designated fields when saved or submitted and display a message based on...
the client type (Notes or Web).
REM "Check the fields for incorrect or missing values" ;
var1 := @If( FName = "" ; "First Name" ; NULL ) ;
var2 := @If( LName = "" ; "Last Name" ; NULL ) ;
var3 := @If( EMail = "" ; "Email Address" ; NULL ) ;
var4 := @If( (@ValidateInternetAddress([Address821] ; Email ) != NULL) & var3 = NULL ; "Email Address Format" ; NULL ) ;
REM "Build Return String" ;
varStr1 := @Trim(var1:var2:var3:var4 ) ;
varStr2 := "The following values are missing or incorrect:":varStr1 ; REM "Validation" ;
@If( (@ClientType != "Notes") & (varStr1 != NULL) ; @Failure("<script>alert("" + @Implode(varStr2 ; "n") +""); history.back()</script>");
(@ClientType = "Notes") & (varStr1 != NULL) ; @Prompt([OK] ; "MISSING OR INCORRECT VALUES" ; ( @Implode(varStr2 ; @char(10) ) ) ) ; @Success )