---
title: jobFieldChanges()
slug: jobfieldchanges
docTags: 
createdAt: 2021-09-14T16:33:14.000Z
---

Return a sequence of changes for the current job, for the given field

### Syntax

Single field: `jobFieldChanges(fieldCode, fromDate, untilDate)`

Multiple fields: `jobFieldChanges(['fieldCode1', 'fieldCode2'], fromDate, untilDate)`



### Parameters

| **Parameter** | **Type**                                   | **Description**                                          |
| ------------- | ------------------------------------------ | -------------------------------------------------------- |
| `field`       | [String](docId\:Ujw2AQAktel5uukLuP73S)     | The slug or ID of a field                                |
| `from`        | [Timestamp](docId\:j1uFZtC3_yprDI3uCIn3u)  | Starting point of the date range to traverse (inclusive) |
| `until`       | [Timestamp](docId\:j1uFZtC3_yprDI3uCIn3u)  | Ending point of the date range to traverse (exclusive)   |

### Return Type

[Sequence](docId\:JG4itlQWafzLpArttFo67) \<[Job Changes](docId\:ciPz7Jxm4WXxPXmDx-uwB)>

| **Parameter**      | **Type**                                     | **Description**                                       |
| ------------------ | -------------------------------------------- | ----------------------------------------------------- |
| `change.fieldCode` | [String](docId\:Ujw2AQAktel5uukLuP73S)<br /> | The value of the field that was updated by the change |
| `change.date`      | [Date](docId\:xTAQdzvLBTAKjxRnpFwe9)         | Returns the data the that the change occured.         |
| `change.type`      | [String](docId\:Ujw2AQAktel5uukLuP73S)       | Will return one of `CREATE` `UPDATE` or `DELETE`      |

### Examples

`jobFieldChanges(baseComp, '-5y').count()`

Returns how many times the `baseComp` field has changed in the last 5 years for a specific job.&#x20;

Would return `3` if the person had 3 changes to their `baseComp` field in the time period.&#x20;



`jobFieldChanges(baseComp, '2024-01-01', '2025-01-01')`

Returns a sequence of changes to the base comp field between 1/1/2024 and 1/1/2025 for a specific job.&#x20;



`jobFieldChanges([department,team,location], '2020-01-01', '2025-01-01')`

Returns a sequence of all changes to the `department, team, or location` fields for a specific job.&#x20;



`jobFieldChanges('title').map{it.update.title}`

Example return:  `["Software Engineer", "Senior Software Engineer"]`

Returns an array of all of the titles across the changes.&#x20;



`jobFieldChanges('title').map{date}`

Example Return: `[2020-01-01, 2020-01-02]`

Returns an array of all of the dates of that the changes occured on.&#x20;



### CQLT Example Template

This would retun a table row with the date of the change and the field that was updated with the title.&#x20;

:::CodeblockTabs
Function

```javascript
  {% for change in jobFieldChanges('title') %}
  <tr>
  <td>{{change.date}}</td>
  <td>{{change.title}}</td>
  </tr>
  {% endfor %}
```
:::

