Class SortingDirection

Represents a sorting direction in which document results are sorted when accessing the content of the system archive.

var api = new TVS.Api();
api.login('username', 'password').then(function() {
    // query archive
    return api.queryArchive(
        {},           // query arguments
        null, null,   // date range
        0, 25,        // page and page size
        DocumentSortingColumn.ApplicantName,
        SortingDirection.Ascending
    );
}).then(function(archive) {
    for (var i = 0; i < archive.Documents.length; i++) {
        console.log(
            i, ':',
            archive.Documents[i].getDocumentTypeDisplay(),
            archive.Documents[i].getFullname(),
            archive.Documents[i].getStatusDisplay()
        );
    }
});

See also

Archive for more information about how to access the system archive.

Result Sorting for more information on sorting archive results.

class SortingDirection()

Represents the sorting direction by which documents are sorted when accessing the archive.

Constant Properties

SortingDirection.Ascending

Documents are sorted in ascending order.

SortingDirection.Descending

Documents are sorted in descending order (reversed).