---
title: AT_MOST
url: https://www.tines.com/docs/formulas/functions/at-most/
kind: formula-function
---

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

# AT_MOST

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

Limits a number to a maximum value.

**Categories:** Numbers

## Syntax

```
AT_MOST(number, maximum)
```

## Examples

### Example 1

Input:

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

Formula:

```
AT_MOST(my_action.message, 5)
```

Output:

```json
4
```

### Example 2

Input:

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

Formula:

```
AT_MOST(my_action.message, 3)
```

Output:

```json
3
```

## Sample actions

```json
{
  "standardLibVersion": "13",
  "actionRuntimeVersion": "2",
  "agents": [
    {
      "disabled": false,
      "name": "My Action",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "message": 4
        }
      },
      "position": {
        "x": 3090,
        "y": 1740
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "AT_MOST",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "at_most": "=AT_MOST(my_action.message, 5)"
        }
      },
      "position": {
        "x": 3000,
        "y": 1830
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "AT_MOST",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "at_most": "=AT_MOST(my_action.message, 3)"
        }
      },
      "position": {
        "x": 3165,
        "y": 1830
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    }
  ],
  "links": [
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 1
    },
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 2
    }
  ],
  "diagramNotes": []
}
```
