# Clone Leave Request HR Entity

This section explains how to **clone the Leave Request entity** and customize it for the **HR role**.\
The HR entity is used by Human Resources to **review prior approvals (Supervisor / PM)** and **enter HR‑level approval decisions and remarks**.

***

### Objective

By completing this section, you will learn how to:

* Clone an existing Leave Request entity
* Enable Supervisor PM fields for review
* Enable HR decision and remark fields for approval
* Prepare an HR‑specific approval screen for Process Designer

***

### Step 1: Clone Supervisor PM Entity

1. From **ONEWEB App Designer**, go to\
   **Entities > Clone Entity**
2. In **Select Existing Entity**, choose:

   ```
   Doc Leave Request Supervisor PM
   ```
3. Set **Name of Clone Entity** to:

   ```
   Doc Leave Request HR
   ```
4. Click **Clone**
5. When the success message is shown, click **Open Cloned Entity**
6. In the **Search Entities** popup, click the **Pencil icon** to edit the cloned entity

***

### Step 2: Enable Supervisor / PM Decision for HR Review

#### Field: **Supervisor / PM** (Dynamic List)

1. Go to module **Leave Request**
2. Locate field **Supervisor/PM**
3. Click the **Pencil icon**

Configure:

* **viewFlag** = `Y`

1. Click **OK**

This allows HR to **see the PM’s approval decision**.

***

### Step 3: Enable Supervisor / PM Remark for HR Review

#### Field: **Supervisor / PM Remark** (Text Box)

1. Click the **Pencil icon**
2. Set:
   * **viewFlag** = `Y`
3. Click **OK**

***

### Step 4: Enable HR Decision Field

#### Field: **HR** (Dynamic List)

1. Click the **Pencil icon**
2. Configure:
   * **viewFlag** = `N`
3. Click **OK**

Setting `viewFlag = N` enables HR to **actively select approval or rejection**.

***

### Step 5: Enable HR Remark Field

#### Field: **HR Remark** (Text Box)

1. Click the **Pencil icon**
2. Configure:
   * **viewFlag** = `N`
3. Click **OK**

This allows HR to record approval remarks or rejection reasons.

***

### Final Result

The completed **Doc Leave Request HR** entity appears as shown below:

<figure><img src="https://docs.oneweb.tech/oneweb/~gitbook/image?url=https%3A%2F%2F2015371994-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FMpDjHWFRUtZ5nJcSfVXd%252Fuploads%252FrKEJtD7XNnje3xrX34Nl%252Fimage.png%3Falt%3Dmedia%26token%3D0ccdc440-1e78-4d27-9af0-64f89250bcb2&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=ce6fdbe0&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

### Summary

In this section, you have:

* Cloned the Supervisor PM Leave Request entity for HR
* Enabled PM decision fields for HR review
* Enabled HR decision and remark fields for approval
* Prepared an HR‑level approval screen aligned with the approval workflow

This entity is now ready to be linked to **Process Designer** as the **HR approval step** in the Leave Control workflow.


---

# 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.onewebstack.com/oneweb-platform-th/tutorials-examples/leave-control-app/app-designer/clone-leave-request-hr-entity.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.
