# Inline Transformations

### Overview

Inline Transformations allow you to modify or derive values directly inside workflow fields, without adding extra steps or using a Code Runner.

They provide a safe, readable way to transform step responses and variables right where the value is used, keeping workflows concise and easy to understand.

### Why Inline Transformations?

To avoid the usage of Code Runners for even small changes such as trimming text or converting a string to uppercase letters.

Inline transformations solve this by enabling:

* Fewer workflow steps
* Reduced dependency on Code Runners
* Faster workflow creation
* Cleaner, more readable workflows

### How Inline Transformations Work

Transformations are written inside `{{ }}` using a dot-based function syntax like `toUpper()`

#### Syntax Rules

* Dots without () → Data access
  * `{{ 1.response.email }}`
* Dots with () → Transformation or operation
  * `{{ 1.response.email.toUpper() }}`

Transformation functions are applied to the respective field values. You can refer to the list of supported functions to transform your data.

{% content-ref url="/pages/GXzd3nq9o9C9HPoqVrkW" %}
[Allowed Functions](/project-manager/workflows/inline-transformations/allowed-functions.md)
{% endcontent-ref %}

### Examples

#### Basic Transformations

```
{{ 1.response.email.toUpper() }}
{{ 2.response.users.0.name.trim() }}
```

#### Working with Variables

```
{{ variables.counter.add(5).increment() }}
{{ variables.settings.merge({"theme":"dark"}) }}
```

Navigate to below page for more examples.

{% content-ref url="/pages/WoCxKogpyEh9exMTwqn8" %}
[Examples](/project-manager/workflows/inline-transformations/examples.md)
{% endcontent-ref %}

### Error Handling & Fallbacks

Inline transformations are designed to fail safely.

#### When an Error Occurs

* A non-blocking warning is logged
* The workflow continues execution
* No data is mutated

#### Using Fallback Values

You can define fallback values if a transformation fails:

```
{{ 2.response.count.add(10).increment().fallback(0) }}
{{ 3.response.items.5.fallback("N/A") }}
```

### Security & Safety

Inline transformations are secure by design:

* Only approved, type-safe functions are allowed
* No eval, no runtime access, no system calls
* Transformations are strictly read-only

{% hint style="info" %}
Inline transformations can derive values, but they never mutate step responses or variables directly.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.dckapintegrator.com/project-manager/workflows/inline-transformations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
