Overview

Incremental search is the search option, Using this option user will get the searching information as soon as the user starts typing in the input search field.

To create this feature in the oracle apex we are going to create a text field item and interactive report. Also, We can create this using the classic report.

Technologies and Tools Used

The following technology has been used to achieve the expected output.

  • JavaScript

Use Case

In oracle apex search option in the reports will work only when the user enters the enter key or when the user clicks the go button. while the user clicks the go button or enter the enter button the page will get reload or the region will get a refresh.

Here we are explained using the interactive report. Also, we can achieve the same using the classic report.

This document explains how to achieve this requirement.

Architecture

The following steps explain in detail,

Step 1:

Create the static region and create the text field item in the static region. Add the “Type to start search…” in the value placeholder. Also, we remove the label for this text field.

Step 2:

Create the interactive report in another region. The query for the interactive report is an example below. You can add the search criteria in the where clause as per your requirement. Here we have added the on-field in the where clause. Also, you can add multiple fields in the where clause.

select * from emp where upper(substr(ename,1, nvl(length(:p6_test), length(ename)))) = upper(nvl(:p6_test, ename));

Step 3:

Add the static ID to the interactive report region.

Step 4:

Click the page property, In that under the JavaScript we are having the execute when page loads option.

We can add the below JavaScript code there.

$(‘#P6_TEST’).keyup(

function(evt) {

$(‘#EMP’).trigger(‘apexrefresh’);

});  

 

P6_TEST –Item name

EMP — static ID of the Interactive report

 

ScreenShot

Output:

By using the above steps, we can add the Incremental search as the search option for the interactive report in Oracle Apex.

Recommended Posts

Start typing and press Enter to search