LimitRevisions (NotesDatabase - JavaScript)

Read-write. The maximum number of entries allowed in the $Revisions field.

Defined in

NotesDatabase

Syntax

getLimitRevisions() : double

setLimitRevisions(revisions:double) : void

Usage

This property corresponds to "Limit entries in $Revisions fields" in the database advanced properties of the UI.

This property must be an integer in the range 0 - 2147483647. When setting it:

  • Any fraction is truncated.
  • A value less than 0 throws Notes® error 4631 ("Value can not be negative").
  • A value greater than 2147483647 throws Notes® error 4673 ("Value must be positive and less than 2147483648").

A value of 0 means no limit.

When $Revisions reaches the limit, a new entry results in deletion of the oldest entry.

The database must be open to use this property.

Examples

This button cycles the revision limit from 0 to 1000 in increments of 100.
var lr = database.getLimitRevisions();
if (lr >= 1000) {
	database.setLimitRevisions(0);
} else {
	database.setLimitRevisions(lr + 100);
}
requestScope.status = "Limit for $Revisions is " + database.getLimitRevisions();