Page-level validation

Page-level validation messages are displayed at the top of the page in Rhythm for Civics.

To define a page-level validation formula, use the Hansen.Core.Result object. Set the result severity to UserError and specify the message that you want to display.

For example, this formula displays a message if the square footage of a residential building application is greater than 20,000:

Dim res as Hansen.Core.Result = Result.Success
if oBuildingApplication.ApplicationType.ApplicationType = "SFD" Then
   if oBuildingApplication.OccupancyType.Code = "RES" and 
            oBuildingApplication.BuildingArea > 20000 then
      Dim resOcc as Hansen.Core.Result = new Result(1, ResultSeverity.UserError, 
            "The Square Footage for residential occupancies must be below 20,000.")
      res += resOcc
   End if
End if
return res