# UCASE( ) Function

**YouTube:** [How to Use the UCase Function in Report Custom Columns?](https://www.youtube.com/watch?v=hTKhmcx3BpE)

## How to Use the UCase Function in Report Custom Columns?

This tutorial guides you through creating and applying expressions in a Document and reporting system using predefined functions. You'll learn how to write expressions in the script editor, apply them in grid and report views, and configure the system for optimal script execution using VBScript. We'll demonstrate this using the UCASE function to convert text to uppercase.

***

### Accessing the Expression Designer:

* Open Sale Voucher or any document.
* Navigate to the "**Setup Column Attributes"**.
* Here, you'll see a list of available columns that can be used to build expressions.
* Click on **"Add/Edit Expression Columns"** where you can write your expression using predefined functions.

<figure><img src="/files/QqZlgPb7nJy0O1lsvxB5" alt=""><figcaption></figcaption></figure>

### Writing Your First Expression

* Every expression must start with the script header: **'#@LSCRIPT**

<figure><img src="/files/K37bBe9AvTCKOiLXaocU" alt=""><figcaption></figcaption></figure>

* Click the (+) Plus icon to create a new expression.
* Fill in the required fields:&#x20;
  * **Expression Name** – A unique name for your expression.
  * **Expression Type** – Choose either **Text** or **Numeric** depending on the expected output.

<figure><img src="/files/qbDs7dXPlDaSzAvHtt9r" alt=""><figcaption></figcaption></figure>

***

### Creating a Simple UCASE Expression

* Double-click your newly created expression to insert it into the script editor.
* Define the expression using the syntax:
  * Expression Name = UCASE("Item Name")
  * This function converts the item name to uppercase letters.

<figure><img src="/files/CG7ZrgfbBy2pkoBjBDwk" alt=""><figcaption></figcaption></figure>

* Click **Save** to apply changes.
* Enable the newly created column in the Setup Column Attributes window to display the expression in the data grid.

<figure><img src="/files/gph2OyDH6KTy5nqTFN80" alt=""><figcaption></figcaption></figure>

* Save and proceed to check the effect.
* You’ll now see a new column where all item names appear in **uppercase**.

<figure><img src="/files/pTJu49wphyIUGsifS3ku" alt=""><figcaption></figcaption></figure>

***

### Applying the Expression in a Report

* Navigate to the **Reporting** section.
* Open the **Sales Register Detailed Report** or any **"Report".**
* Go to **Setup Column Attributes** as you did earlier.

<figure><img src="/files/ZcTAZgEDaVTI9vCTm3sn" alt=""><figcaption></figcaption></figure>

* Before adding the expression to the report, go to **Other Settings**.
* Ensure the **Script Editor** is set to **VBScript**.

<figure><img src="/files/US8rZzar6siLdptkuOMX" alt=""><figcaption></figcaption></figure>

* Click **Save**.
  * *Note: VBScript is the default for new configurations but always verify this setting.*

***

### Adding and Using the Expression in the Report

* Return to **"Setup Column Attribute"** window.
* Click **"Add/Edit Expression Columns"**.
* Every expression must start with the script header: **'#@LSCRIPT**

<figure><img src="/files/SNQZOJSRApDSLCd6BKsD" alt=""><figcaption></figcaption></figure>

* Click the (+) Plus icon to create a new expression.
* Fill in the required fields:&#x20;
  * **Expression Name** – A unique name for your expression.
  * **Expression Type** – Choose either **Text** or **Numeric** depending on the expected output.

<figure><img src="/files/RsOwpgif4CG1yUTLpa0f" alt=""><figcaption></figcaption></figure>

* Double-click the expression to insert it in the editor.
* Define the UCASE expression again:
  * Expression Name = UCASE("Item Name")
  * This function converts the item name to uppercase letters.

<figure><img src="/files/PhLSBtLWfppinAKr9uiF" alt=""><figcaption></figcaption></figure>

* Click **Save**.
* Scroll down and **check the box** to enable the expression column in the report.

<figure><img src="/files/Sb3eODf8QK3ZbywnxaPM" alt=""><figcaption></figcaption></figure>

* **Refresh the report** to view the final result.
  * You will now see the **Item Name** displayed in **uppercase** within the report.

<figure><img src="/files/Q7tAnOaN1gGxWnrKPckX" alt=""><figcaption></figcaption></figure>


---

# 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://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/defining-custom-columns-in-reports-and-grids-with-expressions/ucase-function.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.
