---
title: Key Concepts
slug: UbzXHCfuZThOOKISh2HOa
docTags: 
createdAt: 2023-01-25T15:53:40.000Z
---

To create a Carrot query, it helps to have a basic understanding of fields, operators, values, functions, and methods. You can learn more about these key concepts below.&#x20;

### Fields

A field in Carrot is a word that represents a built-in field or a custom field that has already been defined in ChartHop. All fields are case-insensitive.

A field contains a reference to specific job, employee and organization data, allowing operations to be ran on it in order to perform calculations. For example:

```none
workAddress
```

The `workAddress`field can be used as a reference to an employee's work address found in their employee profile.

Fields may also posses *properties&#x20;*&#x77;hich are unique members of data belonging to the field's particular *data type.&#x20;*&#x46;or example:

```none
workAddress.city:"Oak Park"
```

`city` is a property of the `workAddress` field and has the value of `"Oak Park"`.

[Learn more about fields. ](docId\:XYrLLTZxiE-BV4ZKzEs_g)

### Operators

An operator in Carrot is one or more symbols or words that compare the value of a field on its left with one or more values (or functions) on its right. The valuation of the clause will always result as true. For example:

```none
1 * 2 * 3
```

This query uses the [\* (multiply)](https://docs.charthop.com/multiply) operator to evaluate the basic mathematical statement.

```none
department="engineering"
```

This query returns all records where `department `is `engineering`.

:::hint{type="info"}
Carrot operators understand "money math" and will automatically convert currencies when adding or subtracting two different currencies.
:::

[Learn more about operators.](docId\:wn_9tVffgIwgqTde4ybmy)

### Keywords

A keyword in Carrot is a word or phrase that:

- Joins two or more clauses together to form a complex Carrot query.
  - `directs>0 && department:engineering`
- Alters the logic of one or more clauses.
  - `directs>0 && !department:accounting`
- Alters the logic of operators.
  - `department!="engineering"`
- Has an explicit definition in a Carrot query
  - `department:engineering `where`:` means`"matches"`
  - `workAddress.city:"Oak Park"` where `.` refers to the *property&#x20;*&#x63;ity of the *field&#x20;*&#x77;ork address field
- Performs a specific function that alters the results of a Carrot query.
  - `tenure <= 3`

Carrot contains a limited number of reserved keywords.

[Learn more about keywords.](docId\:a3yPI3EmfPJZ9q_4t7Vww)

### Functions

A function in Carrot appears as a word followed by parentheses, which may contain one or more explicit values or Carrot fields. All functions are case-insensitive.

A function performs a calculation on specific Carrot data or on the function's content (enclosed within its parentheses), such that the results retrieved by the function return as true, and then again by the clause in which the function is used. For example:

```none
baseCompBetween('2017-07-01', '2022-08-01", 1.0)
```

This query will return the base compensation of a person between the dates of January 7th, 2017 and January 8th, 2022.

### Methods

Methods are special types of [Functions](docId\:IZsyKLqFBEtmslMltBMay) that apply to a [List](docId\:xWH_cUkHj9waqaEfb7H71) or Sequence of data. Usually, methods are used to aggregate data – such as counting or summing List values.

For example, to count x

[Learn more about functions.](https://docs.charthop.com/functions)

### Aggregators (Deprecated)

**Aggregators were formerly used in ChartHop Dashboards. However, they are now deprecated and should be replaced with their corresponding Method.&#x20;**

An aggregator in Carrot appears as a word followed by curly brackets, which contains an expression. All aggregators are case-insensitive.

An aggregator performs a calculation on an expression and returns a [Number](https://docs.charthop.com/ucI5-number) value based on the aggregator's logic. For example:

```none
count{department:engineering}
```

This query will return the total number of jobs in the engineering department in the ChartHop organization. All non-numeric values are discarded.

[Learn more about aggregators.](https://docs.charthop.com/aggregators)

### Data types

Carrot understands many common data types, including standard data types such as [Number](docId\:ucI5tCTfVBhonEJ6ZQijg) and [String](docId\:Ujw2AQAktel5uukLuP73S), as well as a number of ChartHop-specific data types such as [Money](docId:_kS5D2xbfoR9d8WfRIVnY) and [Comp](docId\:H_73YLW2UsTscC_TjerlF).&#x20;

[Learn more about data types.](https://docs.charthop.com/data-types)

### Reserved characters

Carrot has a list of reserved characters:

`space (' ') - + = . : ? | * / % [ ]`

These characters are reserved for use in operations and keywords. If you wish to use these characters in queries, you need to surround them with quote-marks. You can use either single quote-marks `'` or double quote-marks `"`.

For example:

```none
title:"'*director'"
```

&#x20;Search for spReserved charactersecial characters in text fields is limited.

### Referencing fields

In many of ChartHop's interfaces, you can use carrot to insert data into any rich text area. For example, you can use carrot to insert data into: [Automated Actions](docId:6k2uHP22MlgnhaOvzQ0yX), [Custom profile tabs](docId\:Kiuev47LOf6QTLVjlujlr),  [Home page](docId:3bBPrW-EGBg1YxIa0fL0C), [Forms](docId\:QR76GaDOskC1RlC_S0jes) or [Resources](docId\:JXOtOCIQ2GhvvBxyOu6jP).&#x20;

The carrot syntax for this is to start with `{{` and then end with `}}` in between you can write a field name or an expression.&#x20;

```none
{{workAddress}}
```

```none
"It has been {{baseComp.lastRaise.date.monthsSince}} months 
since {{name}} has received a raise." 
```







