a!latestHealthCheck() Function

Returns the start time, run status, zip file, and report for the latest Health Check run.

To use this function, Health Check must be configured within the Administration Console.

To call this function, a user must be either a system administrator or member of the Health Check Viewers group. Only system administrators will be able to see the document ID for the zip file returned as part of the HealthCheckOutput.

Syntax

a!latestHealthCheck()

This function does not accept any parameters.

Returns

HealthCheckOutput - This data type is designed to hold the details of the latest Health Check run.

It contains the following fields:

  • startDateTime - This field of type Date and Time indicates when the latest Health Check run was started.
  • runStatus - This field of type Text indicates the status of the latest Health Check run. Possible values include: RUNNING, COMPLETED, FAILED, CANCELED, CANCELING.
  • zip - This field of type Document holds the zip file for the latest Health Check run.
  • report - This field of type Document holds the report for the latest Health Check run.

Examples

Function Results

You can copy and paste this example into the Expression Rule Designer to see how it works.

=a!latestHealthCheck()

Returns the following:

1
2
3
4
[startDateTime=04/25/2020 16:18:38 GMT+00:00,
  runStatus=COMPLETED, 
  zip=[Document:1408], 
  report=[Document:1409]]

Displaying Health Check Results in an Interface

You can copy and paste this example into the Interface Designer in EXPRESSION MODE to see its results displayed.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
=a!richTextDisplayField(
  value: {
    a!richTextItem(
      text: "Status: ",
      style: "STRONG"
    ), 
    a!richTextItem(
      text: a!latestHealthCheck().runStatus
    ),
    "; ",
    if(
      a!latestHealthCheck().runStatus = "COMPLETED",
      a!richTextItem(
        text: "Latest Report",
        linkStyle: "STANDALONE",
        link: a!documentDownloadLink(document: a!latestHealthCheck().report)
      ),
      a!richTextItem(
        text: "No report available",
      )
    )
  }
)
Open in Github

On This Page

FEEDBACK