Skip to Main Content

APEX_200200.IG_RPT_NAME_UK error when calling grid moveColumn JS API in loop on page load

Toufiq - Hexagon PPMMar 26 2022 — edited Mar 26 2022

I have requirement to show columns in IG in a specific order stored as configuration in config table.
On page load I fetch the order of column using AJAX and set the the columns order using grid widget method moveColumn.

// Below code is placed in Function and Global Variable Declaration section.
$("#EMP").on("interactivegridviewchange", function (ev, ui) {
var colsOrder = apex.item("P25_COLUMN_REORDER").getValue();
var grid = apex.region("EMP").widget().interactiveGrid("getViews").grid;
colsOrder.forEach((e, i) => {
var cols = grid.getColumns().map(x =>;
if (cols.indexOf(e) != i)
grid.view$.grid("moveColumn", e, i);

For ease of explanation and testing, ajax call is removed in the above code. P25_COLUMN_REORDER (shuttle item) holds the order of columns as array.

In APEX 20.2, I get the below error on page load.
In environment, it works without the above error but throws uncaught Exception in Chrome console.

Is this a known issue in APEX 20.2? If yes, is there a patch to fix this?
Any other solutions I can use to reorder the columns in an IG?

Post Details
Added on Mar 26 2022