Skip to main content

Command Palette

Search for a command to run...

How to set Oracle APEX page items using JavaScript?

Updated
1 min read
How to set Oracle APEX page items using JavaScript?
A

I am an experienced IT professional with over 10 years of expertise in ERP, specializing in manufacturing and finance modules.

As a solution architect, I am skilled in Oracle PL/SQL and Oracle APEX, with experience in software development, project management, and solution architecture.

Leveraging my expertise in Enterprise Performance Management (EPM), I help businesses make data-driven decisions and improve their performance.

I am committed to staying current with the latest trends and technologies in the industry and enjoy collaborating with colleagues and clients to design and implement solutions that align with their unique business needs.

If you would like to learn more about my experience or have any questions, please feel free to connect with me.

Introduction

This tutorial will help you understand the usage of apex.item javascript API to set the value of a page item.

Syntax

setValue(pValue, pDisplayValueopt, pSuppressChangeEventopt)

Examples

Input Fields

In this example, the value of the page item P1_ITEM will be set to 10. As pSuppressChangeEvent has not been passed, the default behavior of the change event triggering for P1_ITEM will occur.

apex.item( "P1_ITEM" ).setValue( "10" );

Pop-Up LOV/ Select List

In this example, P1_DEPARTMENT is a Popup LOV page item. A pop-up LOV must have a display value and return value. The display value of P1_DEPARTMENT will be set to Sales, and the hidden return value will be set to 10.

apex.item( "P1_DEPARTMENT" ).setValue( "10", "Sales");

This example shows how to suppress the change event when there is no display value.

apex.item( "P1_DEPARTMENT" ).setValue( "10", null, true );

Reference

https://docs.oracle.com/en/database/oracle/application-express/21.2/aexjs/item.html#setValue

A

i got it very informative.

How to? Oracle APEX

Part 10 of 10

This series intended to address common challenges faced during the Oracle APEX development.

Start from the beginning

How to Change the Default ORDS Landing Page in Oracle APEX?

Quick ORDS Hack