---
title: ABS
url: https://www.tines.com/docs/formulas/functions/abs/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# ABS

*[View on tines.com](https://www.tines.com/docs/formulas/functions/abs/)*

Returns the absolute value of a number.

**Categories:** Numbers

## Syntax

```
ABS(number)
```

## Examples

### Example 1

Input:

```json
{
  "my_action": {
    "message": -17
  }
}
```

Formula:

```
ABS(my_action.message)
```

Output:

```json
17
```

### Example 2

Input:

```json
{
  "my_action": {
    "message": 4
  }
}
```

Formula:

```
ABS(my_action.message)
```

Output:

```json
4
```

### Example 3: ABS will also work on text that only contains a number.

Input:

```json
{
  "my_action": {
    "message": "-19.86"
  }
}
```

Formula:

```
ABS(my_action.message)
```

Output:

```json
19.86
```

## Sample actions

```json
{
  "standardLibVersion": "90",
  "actionRuntimeVersion": "73",
  "agents": [
    {
      "disabled": false,
      "name": "My Action",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "example": "-35"
        }
      },
      "position": {
        "x": 150,
        "y": 540
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "aiMonitoringThresholds": [],
      "caseConfiguration": {
        "subStatus": null,
        "tags": []
      },
      "recordType": null,
      "recordWriters": [],
      "form": null,
      "createdFromTemplateGuid": null,
      "createdFromTemplateVersion": null,
      "templateTags": [],
      "originStoryIdentifier": "cloud:00e45749508fe15ca1af3397eab8db78:18f32aa494b49ac605dcc3aa0eda65cc"
    },
    {
      "disabled": false,
      "name": "ABS",
      "description": "Returns the absolute value of a number",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "abs": "=ABS(my_action.example)"
        }
      },
      "position": {
        "x": 150,
        "y": 645
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "aiMonitoringThresholds": [],
      "caseConfiguration": {
        "subStatus": null,
        "tags": []
      },
      "recordType": null,
      "recordWriters": [],
      "form": null,
      "createdFromTemplateGuid": null,
      "createdFromTemplateVersion": null,
      "templateTags": [],
      "originStoryIdentifier": "cloud:00e45749508fe15ca1af3397eab8db78:18f32aa494b49ac605dcc3aa0eda65cc"
    }
  ],
  "sections": [],
  "links": [
    {
      "sourceIdentifier": "0",
      "receiverIdentifier": "1"
    }
  ],
  "diagramNotes": []
}
```
