This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,964 Users
  • 2,269,775 Discussions
  • 7,916,823 Comments

Discussions

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

Madhwal.17
Madhwal.17 Member Posts: 10 Green Ribbon

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.. 😊

Answers