Forum Stats

  • 3,852,385 Users
  • 2,264,100 Discussions
  • 7,905,056 Comments

Discussions

Directly access form after one record retrieved within IR

2687171
2687171 Member Posts: 6
edited Aug 13, 2014 6:18AM in APEX Discussions

Good evening all,

Software used:   APEX 4.2.2

                        Oracle 11g XE

        

I have the typical form with related report created.  The report is an Interactive Report; users love the different functionality offered to them.

I have a requirement where, if a user enters a search criteria, press on the Enter key and only one record is returned, they would love to directly go to the form.  To get how many records are retrieved (one in my case) and which ID to use to retrieve the data within the form are not the issues; I can retrieve that information with the APEX_IR package and/or jQuery.  My issue is the "triggering point".  I tried a on-change dynamic action on the IR Search field (using jQuery for this one:  $('.apexir_SEARCH')   );  it fires only once when the page is refreshed.  I also tried to trigger this through the Footer of a page, and with plain old Javascript; still to no avail.

I also researched this quite a bit, but I still haven't found a solution.

Has someone ever tried this?

Steph

Tagged:

Answers

  • kvlek
    kvlek Member Posts: 196

    Hi,

    You can make an dynamic action with the following options:

    event: after refresh

    Selection Type: region

    region: {choose report region}

    Condition: Java script

    value: ($('.apexir_WORKSHEET_DATA tr').length == 2)

    Regards,

    Kees Vlek

    -----

    * If the question is answered please change it to answered and/or mark the appropriate post as correct/helpfull. *

    2687171
  • fac586
    fac586 Senior Technical Architect Member Posts: 21,204 Red Diamond
    edited Jun 5, 2014 6:49AM
    kvlek wrote:
    
    You can make an dynamic action with the following options:
    
    event: after refresh
    Selection Type: region
    region: {choose report region}
    Condition: Java script
    value: ($('.apexir_WORKSHEET_DATA tr').length == 2)
    
    

    How does this navigate directly to the form?

    Even if it did, what if:

    • The user has opted to view one row per page?
    • There's a control break applied? Then there would be 3 HTML table rows for a single database row.
    • There's an IR detail view that shows one DB row over several HTML table rows?
    • There's a combination of actions including a Group By that results in the IR displaying one data row, but this is an aggregate of several DB rows with no unique PK value to pass to the form?

    And what about the accessibility and usability issues of being redirected to another page? Is it intended to provide a warning that this will happen? Will there be notification on the form page that it has happened?

    So far the whole requirement sounds half-baked to me.

    Who "would love to directly go to the form"? Why? Are the IR actions available to users restricted such that when "one row" is retrieved none of the scenarios described above (and probably many others) that would make this concept unworkable are possible?

  • kvlek
    kvlek Member Posts: 196

    Hi Fac586,

    The question was about the "triggering point" not the action to navigate to the form. That is what i was trying to answer.

    You are right about the you points you make. The selection is too simple for an interactive report but once again Steph already mentioned that he could figure that part out for himself and i just tried to give him the trigger point (after refresh) with an example.

    I totally agree with you that you shouldn't use this concept for several reasons, I probably better pointed that out in stead of giving this solution.

    2687171
  • 2687171
    2687171 Member Posts: 6

    Hey guys,

    Sorry for the delay!   I was pulled to another project...   now, I'm back!

    I do agree with you all about this requirement;  I don't think it should be implemented for several reasons which, to some of them, you answered.

    After talking to the business owners/analysts, trying to make them understand that this requirement has accessibility issues, they finally succumbed and this requirement will not be implemented.

    Thanks you all for your input!

    Steph

This discussion has been closed.