I originally posted this as plain text, but the blog software stripped out important characters, meaning everyone had to clean it up.

So I finally cleaned up the external references w/in the original file and zipped it up.  Such a shame that WordPress.com won’t host a zip file!

I moved the hosting of the source code to Pastebin.com, an ad-supported text-sharing site.


Someone commented that this has trouble handling the IN clause, but it seems to work fine for me.  Please let me know if you find any bugs or have improvement suggestions.



14 Responses to “apex_ir_query package”

  1. […] the package.  Let me know if you find it useful or have suggestions to […]

  2. Dietmar Aust Says:

    Hi Stew,

    I am really interested in your solution, could you please send me the code? Or make the package downloadable? In your blog post the package is somewhat messed up due to the html conversion of special characters.


  3. Stew Says:


    Thanks for the interesting in the solution.

    Sorry for the obfuscation caused by the HTML. I’ll post a zip file soon.


  4. Paulo Vale Says:

    I’d also like to see this working.


  5. Tim Says:

    Is the zipped package available for download, I’m amped to try this solution?

  6. Tyson Jouglet Says:

    You also make a reference to aeo_misc_tools.string_is_valid_date() from within this package. So you are going to have some dependency issues…

  7. stewstryker Says:


    Yes, sorry about that! I published this without checking for any local code dependencies. That function call is to simply check if the incoming string is a valid date. In the case of my application, the format is mm/dd/yyyy.

  8. cl3ft Says:

    Can you please repost your zip file the link to mediafire is broken.

    Thanks a million


  9. Tony miller Says:

    Can you repost the zip file or send it via e-mail? The link in your posting have expired..

    Thank you,

    Tony Miller
    Webster, TX

  10. Carol M Says:

    Stew — I’m with Tony; I’d love to be able to download the file but it’s no longer accessible.

    Carol M

  11. George Says:

    Not being very familiar with javascript and only having just gotten into working with apex, this code has the potential to be the answer to what I was looking for. I am having an issue with the P7_IR_REPORT_ID:’+$v(’apexir_report_id’) portion of the code. The popup window , the url contains , ::P7_IR_REPORT_ID:1211412456457927. However, on running the following query
    SELECT application_id, page_id, report_id,
    condition_column_name, condition_operator, condition_expression, condition_expression2
    FROM apex_application_page_ir_cond cond;
    the report_id that relates to the filter i’m currently using is 1230320709225743, which is different from what is being assigned to P7_IR_REPORT_ID. As a result, I get null returned from the call to apex_ir_query.ir_query_where, everytime.


  12. Bas Says:

    Thanks ! This saves me a lot of time.


  13. […] is also available a packaged solution for this case, done by Patrick L. Stewart. Download the source code for apex_ir_query from here: […]

  14. Bas Says:


    I’m having an issue when setting filters on fields in the IA report based on LOV’s.
    If I filter on for example a department name field ( which is based on a department LOV with and ID and Name ) the filter I receive is for example :
    DEPT_ID = ‘Sales’
    and not the wanted
    DEPT_ID = 10
    ( in which 10 is the department id for department ‘Sales’ ).

    Almost all my fields are based on LOV’s so I have a challenge here 😉

    Any ideas on how to solve this ?


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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: