Skip to Main Content
Feature Request FR-1843
Product Area Application Builder
Status DELIVERED

203 Voters

Refresh Region: Keep Pagination and scroll position

mhage Public
· Aug 25 2021

Idea Summary
The Dynamic Action "Refresh" for the Selection Type "Region" (especially to refresh a report) should keep the current pagination and positions of the scrollbars. The screen should stay in position by default using the refresh.

Actually the refresh will reset the pagination and will reset the scrollposition (if the refresh is called by an element within the report).

Use Case
As an user I have an element within the report column or outside of the report that refreshes the report. I do not have to remember and search my last report position, when I have scrolled or went to the next report pages.

Preferred Solution (Optional)
Boolean element(s) within the Dynamic Action “Refresh” to keep the position

Extension of the API
var region = apex.region( "myRegion" );
region.refresh();

Current workaround for IR: see Refresh IR page

25 Comments

Comments

  • andersonrf OP 3.5 years ago

    We are having this issue now! It would be great not to lose the pagination and scroll position on refresh.

  • coelhohubert OP 3 years ago

    Required for classic reports also especially when the position of the cell that was clicked is in the data of the report which has been scrolled horizontally as well as vertically.

    The cell clicked may have redirected to another page in the application.

  • tony.andrews OP 2.7 years ago

    Frequent use case is opening an update form from a report.  After the update the report refreshes and reverts to page 1, so you often can't see the row you just updated.

  • joseassumpcao OP 1.9 years ago

    Please deliver this functionality in 23.2.

  • yuri_slutsky OP 1.9 years ago

    Great idea!

  • bshumway OP 1.9 years ago

    yup

  • dh OP 1.7 years ago

    Please, we desperately need this.

  • sydney.nurse OP 1.4 years ago

    Need the same on Interactive Grids as well for both page and scroll options

  • ramachandra.gopal.posina OP 1.3 years ago

    The current workaround for IR mentioned above is no longer working. I have tried the plugin provided as well but no luck. Can someone point me to any other workaround available?

  • kapil.singh OP 1.2 years ago

    How long more until this is addressed?

  • badhvaryu OP 1.2 years ago

    This is really too much. This is basic requirement and everyone wants it. It would be nice if the APEX Dev Team can look into it at the earliest.

  • brendan.flanagan OP 1.1 years ago

    This has been an oustanding issue for years and whenever we do an application feedback session with any of our customers - this is the NUMBER ONE requested feature.

    As a user there is nothing more annoying than paging through an interactive report and getting to a set of records hat you want to amend vi alinks to a pop-up modal dialog.  Then making a change and returning to the page - for the page to resresh and land you back on page 1.  So you then have to scroll back to page three to change the next record, then the next etc.

    Some kind of declaritive option to refresh the IR but stay on “current” page is desperately needed.

    Our users constantly ask “is that not fixed yet?” … 

    Regards,

    Bren

  • mshokair OP 1.1 years ago

    As a workaround for this problem, I store the current row id of ig, after refresh navigate to the previously stored record id.

  • brendan.flanagan OP 1.1 years ago

    @mshokair - how do you “navigate” to that row?  If our interactive report contains 100 records and pagination is set at 10.  The user then navigates to page 3 - therefore is showing record 31 to 40 - the user then amneds record 35 … on close of the modal and return to the IR how can we navigate back to pafe 3?

  • mshokair OP 1.1 years ago

    Before opening modal page to amend a record, store the id of that record by using
    https://docs.oracle.com/en/database/oracle/apex/23.1/aexjs/grid.html#getActiveRecordId
    After closing the modal page and doing refresh of ig navigate to the record id by using
    https://docs.oracle.com/en/database/oracle/apex/23.1/aexjs/interactiveGrid.html#gotoCell

  • brendan.flanagan OP 1.1 years ago

    @mshokair thanks for the quick feedback - is that for an Interactive Grid only?  Or do those functions work on an interactive report too?

  • mshokair OP 1.1 years ago

    Unfortunately, it is only for IG.

  • mshokair OP 1.1 years ago

    It is better and easy to convert the IR to IG.

  • john.snyders APEX Team OP 1.1 years ago

    It is best to take support conversations to the Oracle APEX communit forum

    https://forums.oracle.com/ords/apexds/domain/dev-community/category/apex

    Note that getActiveRecordId only applies when edit mode is on.

  • mshokair OP 1.1 years ago

    Agree with you, so getActiveRecordId when editing the row and getSelectedRecords()[0] in other cases

    https://docs.oracle.com/en/database/oracle/apex/23.1/aexjs/grid.html#getSelectedRecords

  • brendan.flanagan OP 1.1 years ago

    @john.snyders - point taken … I saw a possible solution from mshokair and got carried away.

  • karel ekema OP 4 months ago

    Meanwhile, for those interested, find this plugin as to refresh a region keeping the pagination and maintaining the position of any scrollbars. Supports Classic/Interactive Reports and Interactive Grid, Cards/Template Component Regions.

  • j_schuster OP 4 months ago

    Carsten promised that they are working on IR again, so let's hope for low hanging fruits 🤞

  • aamir_sohail OP 4 months ago

    Same as Dynamic Action Plug-in by Karel Ekema

  • omer.cidem OP 5 weeks ago

    Came up with a solution like this for classic reports. It changes Next or Previous buttons' values and  clicks them to stay in the same page while refreshing data. 
    In short: It does refresh data by paginating to the same page.
    staticId: static id of your report => “items-cr”

    function paginateReport(staticId) {
       const paginationText = $(`#${staticId} .t-Report-paginationText`);
       const digitMatch = paginationText.text().match(/\d+/);
       
       const paginationButton = $(`#${staticId} .t-Report-paginationLink--next`).length != 0 ? $(`#${staticId} .t-Report-paginationLink--next`) : $(`#${staticId} .t-Report-paginationLink--prev`);
       if (!digitMatch || paginationButton.length == 0) {
           // if no pagination or no button found(single page) full refresh
           apex.region(staticId).refresh();
           return;
       }
       const currentMin = parseInt(digitMatch[0]);
       const href = paginationButton.attr("href");
       paginationButton.attr("href", href.replace(/(min=)\d+/, `$1${currentMin}`))
       paginationButton.click();
    }