# Create Order Request Entity

*(Order Management App – Web Tutorial)*

This section explains how to create the **Order Request Entity** using **App Designer**.\
This entity represents the main data entry screen for requesters who submit hardware order requests.

The entity consists of:

* **Order Request (Header)** – 1‑1 module
* **Order Request Item (Detail)** – 1‑Many module

***

### Objective

By completing this section, you will learn how to:

* Create an entity in App Designer
* Design form layout with Tabs and Modules
* Configure SQL Work Queue
* Define fields and validations
* Configure Search, Insert, Update actions
* Configure Module Keys and parent‑child relationships

***

### Step 1: Create Entity

1. From **AppSpace**, click **Form**
2. A popup dialog opens

<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%252F3lDyUR6NctRZIc67TDo3%252Fimage.png%3Falt%3Dmedia%26token%3Df4a7bfc8-cdbb-4f99-9f9a-1d4edf845661&#x26;width=768&#x26;dpr=3&#x26;quality=100&#x26;sign=fbc84d78&#x26;sv=2" alt=""><figcaption></figcaption></figure>

3. Enter **Component Name**
4. Click **Start Design**

<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%252Fj3b7jaF5OqeAo8aJQG7g%252Fimage.png%3Falt%3Dmedia%26token%3Ddcd343a1-7fa4-4d53-a2db-8494ddda0728&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=22a54663&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

### Step 2: Create Main Tab (Order Request)

1. From **Tools → Tabs**
2. Drag **2‑Layer Tab** into the entity
3. Set **Title**: `Order Request`
4. Click **Add**

<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%252Fj2thqBSz9OTqoBbIihUA%252Fimage.png%3Falt%3Dmedia%26token%3De5851e0c-e67e-4a13-b76b-051a73e8722b&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=7da0c47a&#x26;sv=2" alt=""><figcaption></figcaption></figure>

<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%252FqkSapX7NNN2XJ6o9zDp3%252Fimage.png%3Falt%3Dmedia%26token%3D9fea48a3-d82e-4f77-bcef-a49c50058263&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=a8d2acd2&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

### Step 3: Create Order Request Module (1‑1)

1. From **Tools → Module**
2. Drag **1‑1 Module** under Order Request tab
3. Click **pencil icon**

<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%252FdywA8wiQOktdtjSOnyWG%252Fimage.png%3Falt%3Dmedia%26token%3Ddb2f5c02-2fd4-446f-b891-357b80a5d802&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=930b6844&#x26;sv=2" alt=""><figcaption></figcaption></figure>

4. Configure Module:

* **Module Name**: `Order Request`
* **Table Name**: `wf_service_request (T)`

<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%252F1ncnQFaGRHRw8dUbPbTO%252Fimage.png%3Falt%3Dmedia%26token%3Debfe8318-268f-4f09-868d-1d52cad97163&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=f94e5b2f&#x26;sv=2" alt=""><figcaption></figcaption></figure>

5. Set **SQL Work Queue**:

```
select wf_service_request.request_id,
    wf_service_request.requester,
    wf_service_request.project,
    wf_ms_project.project_name,
    wf_service_request.phase,
    wf_service_request.description,
    to_char(wf_service_request.create_date,'DD/MM/YYYY HH24:MI:SS') as create_date
from wf_service_request
join wf_ms_project
on wf_service_request.project = wf_ms_project.project_id
```

<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%252FvWY1ZLcghrNvZp6lae2w%252Fimage.png%3Falt%3Dmedia%26token%3D0a725d5c-00a4-4c7e-b60f-b6d4090cb58f&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=b4f6a38a&#x26;sv=2" alt=""><figcaption></figcaption></figure>

6. Click **OK**

***

### Step 4: Configure Layout

1. Click **Configuration Layout**
2. Select **2 Column**
3. Click **Accept**

<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%252F9AaCtEV9qU3fBsl335vh%252Fimage.png%3Falt%3Dmedia%26token%3D97b50295-6925-4c53-a5b3-729d8a7cad17&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=94f89e74&#x26;sv=2" alt=""><figcaption></figcaption></figure>

<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%252FfhnXzTxfVV8UFYuV6drX%252Fimage.png%3Falt%3Dmedia%26token%3Dc8488c4b-92bb-4909-b0c7-a3f41eba905b&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=9f3ed3bf&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

### Step 5–15: Configure Fields (Order Request)

> **Fields Created (exactly as original):**

#### Row 1

* **REQUEST\_ID** (Text Box, readonly, searchable, seq 1)
* **REQUESTER** (Text Box, readonly, searchable, seq 2)

<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%252FjUOdc4pZqNzJRvkGRXpy%252Fimage.png%3Falt%3Dmedia%26token%3D3fc27b45-9401-4e4e-8f02-a69258395cd9&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=d94de321&#x26;sv=2" alt=""><figcaption></figcaption></figure>

<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%252F2AKHeGol9kWEa9YM91g6%252Fimage.png%3Falt%3Dmedia%26token%3D60678619-31fa-4125-b4ac-1377ba808b5f&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=38e5368&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

#### Row 2

* **PROJECT** (Dynamic List → wf\_ms\_project)
* **PHASE** (Dynamic List → wf\_ms\_phase)

<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%252F0euY7FMCtZ1LYml0FolF%252Fimage.png%3Falt%3Dmedia%26token%3D1af92791-ca5d-4e0c-b95f-6b5115958db8&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=fad5cbc7&#x26;sv=2" alt=""><figcaption></figcaption></figure>

<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%252Fe11xDzoyEXyWbqGij3ht%252Fimage.png%3Falt%3Dmedia%26token%3D57416f71-30f4-4150-adf3-9f673343eddc&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=a665f443&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

#### Row 3

* **DESCRIPTION** (Textarea, searchable, like enabled)
* **CREATE\_DATE** (No Object, GUI only)

<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%252FMe0WDF5vWWQtcJ9U0XUy%252Fimage.png%3Falt%3Dmedia%26token%3D9dee2c2f-14a9-44ac-addc-b4321e9fd093&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=869b13f1&#x26;sv=2" alt=""><figcaption></figcaption></figure>

<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%252F2pp6NAz2yHimzowvsuAJ%252Fimage.png%3Falt%3Dmedia%26token%3D8956ec75-fb0a-4917-a36a-2ca24aac1478&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=3ad3897b&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

#### Row 4

* **PROJECT\_NAME** (No Object, GUI only)
* **REQUEST\_TYPE** (Hidden, default = 03)

***

### Step 16–21: Configure Entity Buttons (Order Request)

Buttons created:

* **SEARCH** → `ENTITY_SEARCH`, `searchResult()`
* **CREATE** → `ENTITY_SEARCH`, `addEntity()`
* **SAVE** (Insert) → `saveEntity()`
* **SAVE** (Update) → `saveEntity()`
* **CANCEL** (Insert) → `cancelEntity()`
* **CANCEL** (Update) → `cancelEntity()`

<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%252FJBxnZR3sK1aepr158w7u%252Fimage.png%3Falt%3Dmedia%26token%3Def9e2de3-140d-4bbd-9b73-6fbb2b0467e3&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=16a946bf&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

### Step 22–35: Create Order Item Tab & Module (1‑Many)

1. Add **Normal Tab**
   * Title: `Order Item`
2. Add **1‑Many Module**
   * Table: `wf_order_request_item (T)`

<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%252FEKjr2GNblNrFL9c0eXFG%252Fimage.png%3Falt%3Dmedia%26token%3De73d67d3-5c88-4431-80c5-87e8649e828a&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=f4f3e047&#x26;sv=2" alt=""><figcaption></figcaption></figure>

<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%252FBOJOpbrPadEqi0J9RE5t%252Fimage.png%3Falt%3Dmedia%26token%3D125dfffc-c1e6-4139-960c-c2a42daab094&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=9326c85d&#x26;sv=2" alt=""><figcaption></figcaption></figure>

#### Fields in Order Item:

* REQUEST\_ID (Hidden)
* ORDER\_ITEM\_ID (Hidden)
* HARDWAREID (Dynamic List → wf\_ms\_hardware)
* SPEC (Textarea)
* UNIT (Text Box – Integer)
* REMARK (Textarea)

#### Module Buttons:

* ADD
* DELETE
* SAVE (Insert)
* SAVE (Update)
* CANCEL (Insert)
* CANCEL (Update)

***

### Step 36–37: Configure Module Keys

#### Order Request

* Key: REQUEST\_ID
* Prefix: OD
* Length: 8
* Sequence: REQUEST\_ID\_SEQ

#### Order Request Item

* Key: ORDER\_ITEM\_ID (Prefix IT, Seq ORDER\_ITEM\_ID\_SEQ)
* Parent Key: REQUEST\_ID

***

### Final Result

The completed entity structure appears as follows:

<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%252F7G41SBICg9Hu57mbP8yK%252Fimage.png%3Falt%3Dmedia%26token%3D93bee924-669a-4f01-81be-13c66ffd984c&#x26;width=768&#x26;dpr=1&#x26;quality=100&#x26;sign=c6e8f7a1&#x26;sv=2" alt=""><figcaption></figcaption></figure>

***

### Summary

In this section, you have:

* Created the **Order Request entity**
* Configured master/detail modules
* Designed searchable UI fields
* Added entity buttons
* Defined module keys and relationships

This entity serves as the **main entry point** for requesters in the Order Management App.\
In the next section, you will design screens for **BackOffice, Approval, and Admin PO** roles.


---

# 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/order-management-app-web/app-designer/create-order-request-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.
