> For the complete documentation index, see [llms.txt](https://docs.onum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onum.com/the-workspace/pipelines/actions/transformation/field-transformation/field-transformation-operations/other/parse-int.md).

# Parse int

## Description

This operation parses a string and returns an integer of the specified base (or radix).

In a positional numeral system, the base is the number of unique digits, including the digit zero, used to represent numbers. For example, for the decimal system, the radix is ten, because it uses the ten digits from 0 through 9.

In any standard positional numeral system, a number is conventionally written as (*x*)*y* with *x* as the string of digits and *y* as its base. However, for base ten the subscript is usually assumed (and omitted, together with the pair of parentheses), as it is the most common way to express value. For example, (100)10 is equivalent to 100 (the decimal system is implied in the latter) and represents the number one hundred, while (100)2 (in the binary system with base 2) represents the number four.

Commonly used numeral systems include:

* `2` - Binary numeral system
* `8` - Octal system
* `10` - Decimal system
* `12` - Duodecimal (dozenal) system
* `16` - Hexadecimal system
* `20` - Vigesimal system
* `36` - Base36
* `60` - Sexagesimal system

***

## Data types

These are the input/output expected data types for this operation:

### Input data

![](/files/lPHCVhp93aYrWgLIlhNp) - Strings you want to parse.

### Output data

![](/files/u7JFHzgR3Ovc1ZsQAu88) - Integers after applying the specified base.

***

## Parameters

These are the parameters you need to configure to use this operation (mandatory parameters are marked with a <mark style="color:red;">**\***</mark>):

<details>

<summary>Base<mark style="color:red;"><strong>*</strong></mark></summary>

An integer between `2` and `36` that represents the string's base.

If it's nonzero and outside the range `2-36`, the operation will always fail.&#x20;

If the base argument is `0`, the true base is implied by the string's prefix with leading whitespace and possible `+`/`-` signs removed:&#x20;

* `2` for `0b`.
* `8` for `0` or `0o`.
* `16` for `0x`.
* and `10` otherwise.

For example, if your string is `0b100` and you enter `0` as **Base**, the operation will assume that the true base is `2`.

</details>

***

## Example

Suppose you want to **parse** a series of strings and convert them to integers according to a specific base:

1. In your Pipeline, open the required [Action](/the-workspace/pipelines/actions.md) configuration and select the input **Field**.
2. In the **Operation** field, choose **Parse int**.
3. Set **Base** to `2`.
4. Give your **Output field** a name and click **Save**. The strings in your input field will be parsed according to the specified base. In this example:

```
100(2) -> 4
```

{% hint style="info" %}
You can try out operations with specific values using the **Input** field above the operation. You can enter the value in the example above and check the result in the **Output** field.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.onum.com/the-workspace/pipelines/actions/transformation/field-transformation/field-transformation-operations/other/parse-int.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
