getChange\(String indicator, Object fromDate, Object toDate\)

reference australia Updated Sep 10, 2026 2 min read PAFU-getChange_S_O_O.md
Raw file servicenow.com

Returns the change in the score of an indicator between two specified dates.

Name Type Description
indicator String Unique identifier of the indicator for which to calculate the change.
fromDate Object Initial date of the comparison.
toDate Object End date of the comparison.
Type Description
Number Difference in the specified indicator score between the two dates.

Change from the beginning of the month to the last collection period

In this example, we have the indicator Number of open incidents, whose scores are collected daily. The fromDate parameter is the first second of the current month. This value is constructed as follows:

  1. The system takes the timestamp of the last collection period (score_start).
  2. It extracts the year and the month from the timestamp.
  3. It appends the numeral 01 for the day.

The toDate parameter is the timestamp of the beginning of the last collection period. This timestamp is the first second of the previous day, depending on time zone differences.

JavaScript
pa.getChange($[[Number of open incidents]], new GlideDateTime(score_start.getYear() + '-' + score_start.getMonth() + '-01'), score_start);

Parent Topic:PAFormulaUtils API

Related topics

getChangePercentage(String indicator, Object fromDate, Object toDate)

getCurrentAggregateID()

getCurrentBreakdownID()

getCurrentBreakdownLevel2ID()

getCurrentElementID()

getCurrentElementLevel2ID()

getGap(String indicator, Object onDate)

getGlobalTarget(String indicator, Object onDate)

getPersonalTarget(String indicator, Object onDate)

getScore(String indicator, Object onDate)

PAFormulaUtils API

Search documentation
Search document titles and file paths on the australia branch