Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to modify Go button action in search bar in oracle apex?

Madhwal.17Apr 7 2022

I have an interactive grid with search bar and I want to add dynamic action after clicking on Go button, How can I achieve this.

Problem I want to limit the usage of filters for users to one filter at a time.
So, to check the filters and then removing them i am using javascript code which runs fine.
//js code to remove filters
var vRegion = apex.region("fg-grid");
var vFilters = vRegion.call( "getFilters" );
var totalfilters = 0;
for ( var i in vFilters ){
totalfilters += 1;
}
var totalRec = apex.region("fg-grid").widget().interactiveGrid("getViews", "grid").model.getTotalRecords()
console.log("total rows: "+ totalRec);
console.log("total filters : "+ totalfilters);
for ( var i in vFilters ){
if ( totalfilters > 1 ){
if (i==0){
vRegion.call( "deleteFilter", vFilters[i].id );
}
}
if (totalRec == 0){
$s("P730_ITEMS",totalfilters);
}
}
But the problem arises when to fire this code .
Thank You in advance..

Comments

Madhwal.17

please help

User_QFR8S

In Execute when Page Loads:

$('.a-IG-header button[data-action="search"]').on( "click", function() {
console.log(1);
});

1 - 2

Post Details

Added on Apr 7 2022
2 comments
542 views