Expiration date formulas

You can direct Infor Public Sector to calculate the expiration date for an application using an expiration date formula. For example, you could write a formula that automatically sets the expiration date for an application six months after a building permit has been issued for it. You specify an expiration date formula when you define a new application type or change an existing application type. You must also select the Calculate Expiration Date check box for each milestone at which you want to calculate the expiration date.

If the expiration date formula already exists in your records, you just specify its name in the Expiration Date Formula field in the Application Type dialog box.

Expiration data formulas use the oBuildingApp object (an instance of the Hansen.CDR.Building.iBuildingApplication class) to set ExpirationDate to a date value. For more information about this object and for sample code, click the Information tab in the Formula Editor.

Examples

This formula sets an application to expire six months after the application was processed. Note that this formula will base its expiration date on the Processed status date.


If (oBuildingApp.ApplicationDateTime.Year > 1) Then
  ExpirationDate = oBuildingApp.ApplicationDateTime.AddMonths(6)
End If

This formula sets an application to expire 30 days after a permit was issued for the application. Note that this formula will base its expiration date on the Issued status date.


If (oBuildingApp.PermitIssuedDateTime.Year > 1) Then
  ExpirationDate = oBuildingApp.PermitIssuedDateTime.AddDays(30)
End If

This formula sets an application to expire 90 days after a temporary COO was issued. Note that this formula will base its expiration date on the Temp COO status date.


If (oBuildingApp.TemporaryCOOIssuedDateTime.Year > 1) Then
  ExpirationDate = oBuildingApp.TemporaryCOOIssuedDateTime.AddDays(90)
End If

This formula sets an application to expire one week after a COO was issued for the application. Note that this formula will base its expiration date on the COO status date.


If (oBuildingApp.COOIssuedDateTime.Year > 1) Then
  ExpirationDate = oBuildingApp.COOIssuedDateTime.AddDays(7)
End If

This formula sets an application to expire three months after the application was finalized. Note that this formula will base its expiration date on the Final status date.


If (oBuildingApp.FinalizedDateTime.Year > 1) Then
  ExpirationDate = oBuildingApp.FinalizedDateTime.AddMonths(3)
End If

This formula sets an application to expire if it has been inactive for six months. Note that this formula will base the expiration date on the date of the last recorded activity for the application. An activity is an update or addition to the application or to its supporting information, such as fees, inspections, reviews, and conditions.


ExpirationDate = oBuildingApp.LastActivityDateTime.AddMonths(6)