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!

Method setSelectedRecords ignores some of the values in a page item.

KjeldJan 20 2023

Hello all,
My APEX-Versions: 21.2.7/22.1
I have a page with an IG based upon a table of two columns, COL1 and COL2. COL1 is set as the primary key item. Item "COL2" is a description and a normal text field. On the IG multiple selection is enabled.
The table contains following values:
COL1 COL2
CO Medium CO
E Medium E
G Medium G

On the page there is a dynamic action (JavaScript Code) on "Page Load" that is used to set a record as selected:
apex.region("IG_MEDIUM_AUSWAHL").widget().interactiveGrid("getViews","grid").setSelectedRecords(["CO"],true,true);
Above does not work. The record with value "CO" does not get selected. If I change the value to "E" instead of "CO" then the record is set to "selected". It seems it only works in my case where COL1 has values with only one character.
I have been looking into this issue already whole day and I have no clue why it goes wrong with only some of the values.

This post has been answered by Hamza Al-abbasi on Jan 20 2023
Jump to Answer
Comments
Post Details
Added on Jan 20 2023
2 comments
873 views