---
title: length()
slug: length
docTags: 
createdAt: 2021-09-14T17:47:57.000Z
---

Returns the number of items in a list or set, or the length of a `String`.&#x20;

### Syntax

`length(value)`

- `value` - the list or String to be evaluated.

**Return type:&#x20;**[Number](docId\:ucI5tCTfVBhonEJ6ZQijg)&#x20;

### Sample usage

`length("hello there")` returns `11`

`length(favouriteEmployees)` returns `5` if the number of `Person` values in the field is `5`.

### Supported data types

| **Input type**                                               | **Return type**                         | **Logic**                                                                   |
| ------------------------------------------------------------ | --------------------------------------- | --------------------------------------------------------------------------- |
| ****[String](docId\:Ujw2AQAktel5uukLuP73S)  or list of items | [Number](docId\:ucI5tCTfVBhonEJ6ZQijg)  | Returns the number of items in a list or set, or the length of a `String`.  |
| *Unsupported data types*                                     | **[Null](docId\:N9trVqonnBknqL9DrNBP6)  | Unsupported data types return `Null`.                                       |

