Calculating an expiration date for a use application type

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 eight hours after a special event is supposed to end. You specify an expiration date formula when you define a new application type. You must also select the Calculate Expiration Date check box for each milestone at which you want Infor Public Sector to calculate the expiration date.

Expiration data formulas use the oUseApp object (an instance of the Hansen.CDR.Use.iUseApplication 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. This formula will base its expiration date on the Processed status date.


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

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


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

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


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

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


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

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


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

This formula sets an application to expire if it has been inactive for six months. 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 = oUseApp.LastActivityDateTime.AddMonths(6)