Tuesday, 21 May 2019

Interactive Report - Disable row search

Requirement: 

To improve performance, disable row search on interactive report, at the same time, allow users to select a column and perform search on it.
That is to disable search like below:



Solution:

  1. Create a dynamic action as below:
    • Name: Disable IR Row Search
    • Even: Key Press
    • Selection Type: jQuery Selector
    • jQuery Selector: .a-IRR-search-field
    • Event Scope: Dynamic 
  2. Create TRUE action as below:
    • Action: Execute JavaScript Code
    • Code:
var vTitle = $(this.triggeringElement).attr("title");
if (vTitle == "Search Report" || vTitle == "Search")
{
    alert("Please select a column to search on.");
    this.browserEvent.preventDefault();
}

Result:

Row Search without selecting a column:
 

Select First Name from magnifying glass dropdown:
 

Search for First Name like 'Dean':

No comments:

Post a Comment