Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Applying filter on Interactive Grid causes Refresh after Selecting a Row

jaramillMay 22 2025 — edited May 23 2025

Oracle APEX version 21.3.2

Oracle Database version 19.0.0

I have an Interactive Grid and some columns are hidden, some are not. The ones that are visible only 1 I allow the filter column header grid options to be visible. The others I disable via some JavaScript code in the “JS Init Code” section per each column.

The user enters in values for the search parameters then runs the search.

The following column “Consent” has either N or Y, and the user can apply a filter once the original search parameters were entered and the search was executed

So now once the filter is applied, only those (in this case user chooses Y) with Y are shown, and the rows with “N” are filtered out.

Now as soon as the USER clicks on a Row, I have a Dynamic Action that fires. The problem is after it fires, it then resets the IG back to the original result set that includes all rows without any filtering on the “Consent” column. In fact one of the actions in my DA is to show/hide buttons based on whether or not a “row” was selected.

So I do see the buttons briefly become visible then it disappears and reverts back to the original state.

Any thoughts? What am I missing?

Here's the JS code for the 1st true action within my DA

apex.region("PHYS_HLTH_CERT_SEARCH_IG_STATIC_ID").call("getActions").invoke('reset-report');	d

var grid   = apex.region("PHYS_HLTH_CERT_SEARCH_IG_STATIC_ID").widget().interactiveGrid("getViews", "grid");
var model  = grid.model;
var record = grid.getSelectedRecords()[0];

if(record)
{
    apex.item( "P7_SELECTED_SSN" ).setValue( model.getValue( record, "SSN" ) );
    apex.item( "P7_OUTBOUND_ENCRYPTED_SSN" ).setValue( model.getValue( record, "ENCRYPTED_SSN" ) );
    apex.item( "P7_SELECTED_FIRST_NAME" ).setValue( model.getValue( record, "FNAME" ) );

    apex.item( "P7_ROW_SELECTED" ).setValue( "Y" );

    apex.jQuery("#Exposure_Form_Button_Static_ID").show();
    apex.jQuery("#Certifications_Button_Static_ID").show();
    apex.jQuery("#Show_Report_Button_Static_ID").show();
}
else
{
    apex.item( "P7_ROW_SELECTED" ).setValue( "N" );

    apex.jQuery("#Exposure_Form_Button_Static_ID").hide();
    apex.jQuery("#Certifications_Button_Static_ID").hide();
    apex.jQuery("#Show_Report_Button_Static_ID").hide();    
}

Once these apex items are set with values then the other true actions will run the logic based on those values.

Comments
Post Details
Added on May 22 2025
0 comments
94 views