This discussion is archived
3 Replies Latest reply: Apr 5, 2013 5:45 AM by VC RSS

APEX IR: Highlight Searchterm in Resultlist ?

821366 Newbie
Currently Being Moderated
Hello all,

DBMS 11GR2
AE 4.1.1.00.23

The use of classical reports offers the ability to hightlight the entered searchterm in the resultsets items.
Users would like to have this quite comfortable Display in Interactive reports , too.

I'm not very experienced in Javascript or JQuery jet,
but I suppose that a dynamic action against row content could do the trick.

What has to be done to face these requirment?

Any help is appreciated.

kind regards


Franz
  • 1. Re: APEX IR: Highlight Searchterm in Resultlist ?
    VC Guru
    Currently Being Moderated
    1. First extend existing jquery to perform an case insensitive search
    Add this to page header > javascript
    $.extend($.expr[":"], {
         "NCcontains" : function (elem, i, match, array) {
              return (elem.textContent || elem.innerText || "").toLowerCase().indexOf((match[3] || "").toLowerCase()) >= 0;
         }
    });
    Create a hidden page item lets say PX_IR_SEARCH_TEST

    Create a dynamic action1 as follows:
    Event- Before refresh of your ir report region
    True Action - Execute Javascript code
    Code -
    $s('PX_IR_SEARCH_TEST',$v('apexir_SEARCH'));
    Create a dynamic action2 as follows:
    Event- After refresh of your ir report region
    True Action - Execute Javascript code
    Code -
    if ($v("PX_IR_SEARCH_TEST").length > 0 ) {
    $('.apexir_WORKSHEET_DATA td:NCcontains('+$v("PX_IR_SEARCH_TEST")+')').css("font-weight","bold");
    //this highlights the whle cell into bold but you can change this to your needs
    }
    Make sure you set the Event Scope to Dynamic for both dynamic actions
  • 2. Re: APEX IR: Highlight Searchterm in Resultlist ?
    821366 Newbie
    Currently Being Moderated
    Thank You VS,

    this works until control panel comes up.
    Action2 should fire on "After Refresh" to prevent from this effect.


    Kind Regards

    Franz

    Edited by: FL-BN on 05.04.2013 13:45
  • 3. Re: APEX IR: Highlight Searchterm in Resultlist ?
    VC Guru
    Currently Being Moderated
    FL-BN wrote:
    Thank You VS,

    this works until control panel comes up.
    Action2 should fire on "After Refresh" to prevent from this effect.
    I was meant After refresh, it was a silly Ctrl+C/Ctrl+V mistake

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points