> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pdia-data-integration/9.3-data-integration/pdi-transformation-steps-reference-overview/modified-java-script-value/java-script-pane.md).

# Java Script pane

The **Java script** pane is the editing area for writing your code. You can insert constants, functions, input fields, and output fields from the **Java script functions** pane on the left by double-clicking the node you want to insert or by using drag-and-drop to place the object onto the **Java Script**panel.

| Field                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Position**           | Display the line number and position of the cursor.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Compatibility Mode** | <p>Select the <strong>Compatibility mode</strong>option to use the <code>2.5</code> version of the JavaScript engine. When this option is not selected (default), the step uses version 3 of the JavaScript engine.</p><p>In the 2.5 engine, value objects are directly modifiable and their type can be changed. For example, you can convert a date variable into a string. This is not supported in the 3.0 engine, so the JavaScript should run faster. For more details on the different versions, see Migrating JavaScript from 2.5.x to 3.0.0.</p><p>PDIPDI uses the Rhino engine from Mozilla.</p> |
| **Optimization level** | <p>Select the level of JavaScript optimization. The values are:</p><ul><li><strong>1</strong></li></ul><p>JavaScript runs in interpreted mode.</p><ul><li><strong>0</strong></li></ul><p>No optimizations are performed.</p><ul><li><strong>1-9</strong></li></ul><p>All optimizations are performed. 9 performs the most optimization with faster script execution, but compiles slower. The default is 9.</p>                                                                                                                                                                                            |


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pentaho.com/pdia-data-integration/9.3-data-integration/pdi-transformation-steps-reference-overview/modified-java-script-value/java-script-pane.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
