# Set Form Level Validations in Setup Items

YouTube: [How to Assign Form Level Validations in Setup Items to Users in Logic ERP Software?](https://www.youtube.com/watch?v=mBts9xlzcT0\&t=245s)

In this tutorial, we'll explore how to use expression validation item configuration-wise in Logic ERP. This feature helps maintain data accuracy by applying custom validation rules during item creation.

***

### Steps to Apply Expression Validation in Logic ERP

* Navigate to **Setup Items** and then click on **Setup Items Multiple Pack Sizes**.
* By default, groups are marked as **Not Required**, allowing item creation without entering group details.
* To apply validation, mark the **Gender Group** as **Required**.

<figure><img src="/files/0DUJCxESy80RsTyFvDZ8" alt=""><figcaption><p>The image shown above shows that the Gender group has been marked as required by right clicking on  it.</p></figcaption></figure>

* Add an **Expression** in MRP ensuring it is greater than the sale rate.

<figure><img src="/files/U5MKSJrxeIW4vnmBSGmP" alt=""><figcaption><p>The image illustrates how expression is defined.</p></figcaption></figure>

* As soon as you apply an expression in MRP, it will be displayed in red color.

<figure><img src="/files/BcCoUg0LHOW86JLMLgT8" alt=""><figcaption><p>The above shown image shows that MRP field is marked in RED color stating that the expression has been applied</p></figcaption></figure>

### **Testing Validation Rules**

* Start creating an item.
* Skip the **Category Group** to test validation.
* The system will prompt an error message: *"Group 1 cannot be blank"*.

<figure><img src="/files/zUneWqCMB02VeBhIqReC" alt=""><figcaption><p>The image shown above displays the error message shown due to the validation applied on the group when left blank.</p></figcaption></figure>

* Enter a valid category and proceed.
* Set **MRP less than Sale Rate** to check expression validation.
* The system will display: *"MRP must be greater than the sale rate"*.

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

* Enter a correct MRP and successfully save the item.

### **Creation of Item Setup Configuration**

* Navigate to the Setup and expand Setup Items.
* Locate the option "**Setup Configurations for Item Setup**".
* Enter a configuration name and save the data.

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

* Now, click on "Set Configuration" to create a separate configuration for individual users.

<figure><img src="/files/03lLAoZzsYBXKsnO6pBi" alt=""><figcaption></figcaption></figure>

### **Assigning User Access Rights**

* Navigate to **User Access Rights**.
* Select the user and assign "Setup Item Configuration".
* Assign configurations:
  * **Aakash** → Finished Item Configuration
  * **Rahul** → Raw Item Configuration

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

### **Supervisor Role: Setting Validation Rules**

* Log in as **Supervisor**.
* Navigate to **Setup Items Multiple Pack Sizes**.
* Set validation rules:
  * **Raw Item Configuration** → Mark **Category** as mandatory, enforce **MRP > Sale Rate**.
  * **Finished Item Configuration** → Mark **Fabric** as mandatory.

### **Testing User-Specific Validations**

* Log in as **Amit** (Finished Item Configuration user) and check the fabric field validation.
* Log in as **Rahul** (Raw Item Configuration user) and check category and MRP validation.

**Conclusion**

Expression validation in Logic ERP ensures data consistency, accuracy, and compliance across inventory management. Supervisors can define and enforce validation rules, minimizing errors and improving efficiency.


---

# 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/setups/setup-items/setup-items-multiple-pack-sizes/set-form-level-validations-in-setup-items.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.
