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!

How to reference the column of an interactive grid while using in a dynamic action (set Value)

User_Q16K1Jan 25 2022

Hello Apex Friends,
I am working on master details form,
in details level I'm using IG and there is one column which is set as select list ( example: account_id and account_code)
now, I'm trying to display account_name in forms field
First Try:
JavaScript with IG change row event :
this JS show [object object] and when i tried it without select list field, it works
JS code as following
--------------------------------------------------------------------------------------------
var v_acc_desc;
var v_factorcode
model=this.data.model;
if(this.data != null){
if(this.data.selectedRecords[0] != null){
v_acc_desc = model.getValue(this.data.selectedRecords[0],"ACCOUNT_ID");
v_factorcode = model.getValue(this.data.selectedRecords[0],"FACTOR_ID");
}}
apex.item("P104_ACC_DESC").setValue(v_acc_desc);
apex.item("P104_FACTOR_DESC").setValue(v_factorcode);
-------------------------------------------------------------------------------------
2nd Try
set value Dynamic action but no luck
SELECT ACCOUNT_NAME FROM GL_ACCOUNTS_HEADER WHERE ACCOUNT_ID = :ACCOUNT_ID
here account_id is IG column
--------------------------------------------------------------------------------------
JV.PNG

This post has been answered by Hamza Al-abbasi on Jan 25 2022
Jump to Answer
Comments
Post Details
Added on Jan 25 2022
5 comments
12,269 views