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!

Extract column value into page item

TomekOct 25 2020 — edited Oct 25 2020

I have the Master-Detail page based on two IG. As the user clicks on the various rows in the Master section of the page I would like to extract the value of one of the columns. To be specific I need to get PERSON_ID for currently clicked/selected row. The PERSON_ID column is defined as PK and Hidden.
In my approach I did the following
created the region item P10_PERSON_ID
defined the static id of "emps-ig" for the master IG region
added the DA action for event "Selection Change [IG]", type of "Region", and picked my master region
The DA executes the following JavaScript
var grid = apex.region('emps-ig').call('getViews','grid');
var model = grid.model;
var record = model.getRecord(vRecordId);
var person_id = model.getValue(record, 'PERSON_ID');
$s('P10_PERSON_ID', person_id);
image.pngWhile executing the page I get the following error:
ERR-1002 Unable to find item ID for item "PERSON_ID" in application "510".
While troubleshooting it looks like the "var record = model.getRecord(vRecordId);" line is not working as expected. I tried various things but nothing seems to be helping.
Whle looking into the console viewer I see the following error:
image.png

This post has been answered by Veerendra Patil on Oct 25 2020
Jump to Answer
Comments
Post Details
Added on Oct 25 2020
3 comments
1,154 views