---
sourceDocument: Australia Platform Analytics
sourceDocumentLink: https://www.servicenow.com/docs/r/now-intelligence

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Platform Analytics

ft:clusterId :

    - par

bundleId :

    - par

workflow :

    - Platform


---

# Update Performance Analytics scripts

# Update Performance Analytics scripts {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Platform Analytics Solutions include Performance Analytics scripts to perform
calculations on records. These scripts use the time stamp fields from the indicator sources.
If you change the time field stamps in an indicator source, also modify the related
scripts.

## Before you begin

Important:  
If you did not update any indicator sources in your Platform Analytics Solutions, skip this task.

Role required: pa_admin, admin

## Procedure

1. Navigate to AllPerformance AnalyticsAutomationScripts.
2. Click a script to open its details.  
   For example, the Change.CloseTime.Hours script record contains the following script:

       var diff=function(x,y){return y.dateNumericValue() - x.dateNumericValue();};
       var hours=function(x,y){return diff(x,y)/(60*60*1000);};
       hours(current.opened_at, current.closed_at);

3. In the Source section, click the lock icon next to the list of Fields.  

   <br />

   The Fields selector opens.
4. Move the desired fields into the fields that are Selected for the script, and remove fields that are not appropriate.  
   For example, if your organization uses the Created time stamp field to define a new change, replace Opened with Created.

5. In the Script field, replace the references to disused fields with references to the fields you just selected.  
   In this example, references to the Opened field are replaced by references to Created.

       var diff=function(x,y){return y.dateNumericValue() - x.dateNumericValue();};
       var hours=function(x,y){return diff(x,y)/(60*60*1000);};
       hours(current.opened_atcurrent.sys_created_on, current.closed_at);

6. Click Update to save your changes.
**Previous topic:** [Review the indicator sources](https://www.servicenow.com/docs/33ecFY13QQkGsaIiGWalzQ "Determine which fields contain the data you are looking for in each application you are enabling for Performance Analytics.")  
**Next topic:** [Review the breakdown sources](https://www.servicenow.com/docs/g_fDMvl2ywR4bLYIG1KXkw "Breakdown sources represent the elements that you use to examine a KPI in more detail. Modify the breakdown source to limit the element list to only those items that are meaningful for the data analysis.")

*[\>]: and then


