Wednesday, March 02, 2011

APEXBlogs v2 - Search

This post is part of the 10 days of APEXBlogs. This series of blog posts highlight the features of the new version (APEXBlogs v2) of APEXBlogs.info which will be released shortly.

Post 10... the last post before the launch of the new APEXBlogs!

In April last year I already blogged about the nice search in APEX 4, but wouldn't it be nice to have such functionality in APEXBlogs too?

I didn't think it would be interesting to do the number search to go straight to an App and Page, but typing in a text and getting all the results throughout the application is a nice timesaver.
(the screenshot is from APEX itself, you will see the one in APEXBlogs when it launches...)


So that is exactly what I build in APEXBlogs. You type in a text and it will retrieve all the blog posts, tweets, plugins etc where the search string appears in.

If you want to create such a search in your application yourself, here are the steps to do that:
  1. Create a Page and give it an Alias of SEARCH
  2. Create an Interactive Report Region on that page based on the tables and columns you want to search in
  3. Create a Region with an Item called P0_SEARCH on Page 0
  4. Create a Dynamic Action on Page 0:
    - Event: Key Release
    - Item: P0_SEARCH
    - True Action: Execute Javascript Code:
    if(this.browserEvent.keyCode == 13) {
    window.location = 'f?p=&APP_ID.:SEARCH:&APP_SESSION.:::RIR:IR_ROWFILTER:'+$v('P0_SEARCH');
    }
That's it... you will have an amazing search in your application now.

1 comment:

  1. Very nice Dimitri! Sounds like you have lots of good stuff coming. Looking forward to it.

    Regards,
    Dan

    ReplyDelete