> For the complete documentation index, see [llms.txt](https://kb.logicerp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/writing-formulas-in-the-script-editor/add-new-expression.md).

# Add New Expression

**Add New Expression** adds a field of your own to the **Field List** of the **Script Editor**, so a formula can store a value in it and other formulas can use it. The buttons for it are shown only where the screen allows fields of your own - today that is the expression settings of report and grid columns on the desktop.

### **Add a field**

* In the **Script Editor**, press **Add New Expression**.
* Enter the **Expression Name** and choose the **Expression Type**: **Numeric** (the default) or **Text**. **Enter** moves from the name to the type and then to **Ok**.
* Press **Ok**. The new field appears in the **Field List** in blue, with the value 0. **Cancel** closes the window without adding anything.
* A blank name gives *Please Enter Expression Name*; a name already in the list (in any letter case) gives *Expression with same Name already exists*.

### **Delete a field**

* Select the field in the **Field List**, press **Delete Expression** and answer **Yes** to *Are you sure you want to delete selected field*.
* Only fields of your own (the blue ones) can be deleted; for the others you see *Only user defined fields can be deleted*.


---

# 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://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/writing-formulas-in-the-script-editor/add-new-expression.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.
