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