# Pass Parameter

**Pass Parameter** is a Page Designer feature that allows you to **send data from one page to another** during navigation.\
This is commonly used to pass user input, context data, or identifiers (such as IDs) between pages.

Typical use cases include:

* Passing search or form input to a detail page
* Navigating from a list page to a detail page
* Preserving user context between pages

In ONEWEB, parameters are passed using **Page State Parameters** and **Query Parameters**.

***

### Example Scenario

In this example, we will:

* Create **Page1** (source page)
* Create **Page2** (target page)
* Pass **First Name** and **Last Name** values from Page1 to Page2

***

### Step 1: Create Page State Parameters in Page2

1. Open **Page2** in Page Designer
2. Create **Page State Parameters** to receive values from Page1

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FFukZsuxl33mOs1Op2cdg%2Fimage.png?alt=media&#x26;token=b8be0852-fcda-4341-ac31-fa7f01d73f4c" alt=""><figcaption></figcaption></figure>

<p align="center"><em>Create Page State Parameters in Page2</em></p>

{% hint style="info" %}
For detailed instructions, refer to the\
<https://docs.oneweb.tech/oneweb/reference/page-designer-reference/page-designer-tools/generic-tools/page-designer-parameter> documentation.
{% endhint %}

***

### Step 2: Bind Page Parameters to UI Components in Page2

1. Add **Label** components to Page2
2. Map each Label to the corresponding Page State Parameter

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FNFnpsLWwoDP9TUi2lbGh%2Fimage.png?alt=media&#x26;token=22a36e68-1a65-42d1-b859-04ba41b1e778" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FK0Iif3oiti4PHvV73IyH%2Fimage.png?alt=media&#x26;token=b650c566-831d-4958-8660-29591dfd14e2" alt=""><figcaption></figcaption></figure>

<p align="center"><em>Create label fields in Page2</em></p>

This allows Page2 to display values received from Page1.

***

### Step 3: Create Page State Parameters in Page1

1. Open **Page1**
2. Create **Page State Parameters** to hold user input

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2F4SGVrAHWWa3OJuYHPIM2%2Fimage.png?alt=media&#x26;token=c9dd7c91-3285-4e01-9d50-7e2b60b69023" alt=""><figcaption></figcaption></figure>

<p align="center"><em>Create Page State Parameters in Page1</em></p>

***

### Step 4: Bind Input Fields to Page1 State Parameters

1. Add **Input** fields (e.g. Text Fields) to Page1
2. Map each input field to a Page State Parameter

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FwthgXzzQQtxI9PUAjSKi%2Fimage.png?alt=media&#x26;token=4ceedcbd-685d-49ef-a7b1-a605e74bd8b0" alt=""><figcaption></figcaption></figure>

<p align="center"><em>Bind input fields to Page1 state parameters</em></p>

***

### Step 5: Configure Navigation with Query Parameters

1. Add a **Button** to Page1 (e.g. “To Page2”)
2. Configure the button to link to **Page2**
3. Click the **Query Parameter** icon to pass values

*Configure page navigation with Query Parameters*

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FL92wvcHu82abcY3bLCr6%2Fimage.png?alt=media&#x26;token=665ff566-2439-499e-bf05-d042b88dfd3b" alt=""><figcaption></figcaption></figure>

***

### Step 6: Set Query Parameter Values

1. Map Page1 state parameters to Page2 parameters
2. Save the configuration

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FCac0pkdq8AjtM8Xn7B73%2Fimage.png?alt=media&#x26;token=6377ded0-362d-4405-9f22-f56a9c70eb36" alt=""><figcaption></figcaption></figure>

<p align="center"><em>Set values in Query Parameter screen</em></p>

***

### Step 7: Build and Test

1. Build the application
2. Open **Page1** in runtime
3. Enter values into input fields
4. Click **To Page2**

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FlVec90NeyfzZOM7PGI2K%2Fimage.png?alt=media&#x26;token=eb9cc425-e618-4a4b-832f-1972d2d774e1" alt=""><figcaption></figcaption></figure>

<p align="center"><em>Enter data on Page1</em></p>

***

### Result: Parameters Passed Successfully

The values entered in Page1 are displayed correctly in Page2.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FVOmEJS016vLlIIHdOUaP%2Fimage.png?alt=media&#x26;token=12f518c8-4df9-4c65-aac9-b9379a8a20f2" alt=""><figcaption></figcaption></figure>

<p align="center"><em>Values displayed on Page2</em></p>

***

### Design Perspective

As part of **Page Designer best practices**:

* Use Page State Parameters to manage page‑level data
* Use Query Parameters for navigation‑based data transfer
* Keep parameter names consistent and meaningful
* Avoid passing large or sensitive data via query parameters

Pass Parameter functionality enables **clean, modular, and context‑aware navigation** between pages.


---

# 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/building-apps/ui-page-designer/ux-ui-components/pages/page-features/pass-parameter.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.
