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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Getting column metadata in interactive grid

Luka TriciklinJan 10 2022 — edited Jan 10 2022

Hello everyone!
I am trying to add my own action to interactive grid.The action is supposed to copy cell value from the previous row in model to the current input / area I am focused on. (only value from cell above, not whole row).
I can get row metadata I am currently in with getContextRecord using the element parameter in function, but I can't get column I am currently in. Is that possible?My current code:
actions.add({
name: "copyCellFromAbove",
label: "copyCellFromAbove",
action: function (menu, element) {
const view = apex.region(statId).widget().interactiveGrid("getViews").grid;
console.log(view.getContextRecord(element)[0]);
},
});
Later, i would use getValue method, for example as in documentation:
var name = model.getValue( someRecord, "NAME" );
But i need to get column ID (in example "NAME") from column i am curently focused in.
Thank you in advance!

This post has been answered by Hamza Al-abbasi on Jan 13 2022
Jump to Answer
Comments
Post Details
Added on Jan 10 2022
4 comments
2,586 views