Senthil Murugan's Blog

Home » Apex » Initial column name for search–Apex reports

Initial column name for search–Apex reports

If you want to default the search column in an Interactive Report, you can easily accomplish this with a Dynamic Action on the After Refresh event of your IR. This way instead of the report searching all columns, it will search the one you set it to (unless the user selects something different, of course)

No default With Default Column

Dynamic Action: Set Default IR Search Column
Event: After Refresh
Selection Type: Region
Region: select the IR region on your page
Condition: JavaScript expression with the code:

$v("apexir_CURRENT_SEARCH_COLUMN") == ""

True Action: “Execute JavaScript Code” with the following code:

$s("apexir_SEARCH_COLUMN_DROP", "Empno");
$s("apexir_CURRENT_SEARCH_COLUMN", "EMPNO");

Make sure it does fire on Page Load.

There are two values that need to be set. What the user sees on the screen “apexir_SEARCH_COLUMN_DROP” and what the IR will use as a column “apexir_CURRENT_SEARCH_COLUMN”, make sure this last one matches your column name.

By using the After Refresh event we make sure the default search column is set again after the report refreshes.

Thanks to Jorge Rimblas 

http://rimblas.com/blog/2013/11/default-ir-search-column/

Advertisements

1 Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: