当(选择更改(交互式网格))时,我需要从项目的弹出lov列中设置值,但是该值看起来像[object Object]
这是我的代码:
var id = 1234
var query = (SQL
`SELECT fname, lname, email
FROM users
WHERE id = ${id}`
)
var sql = require('./db.js');
sql.query("select * from table where field1 = ${field1val} or field2 = ${field2val} ", [field1val, field2val], function (error, results) {
if(error){
//handle error
}
else{
//handle the results
}
}
我如何显示真实价值?
答案 0 :(得分:0)
//Use the below code in the Apex Page
//Event: Selection Change Interactive grid
//True Action: Javascript code
//To get the IG column values based on selection.
//EMP is the Static ID of the IG region.
var record;
var ig$=apex.region("EMP").widget();
var grid=ig$.interactiveGrid("getViews","grid");
var model= ig$.interactiveGrid("getViews","grid").model;
var selectedRecords=apex.region("EMP").widget().interactiveGrid("getViews","grid").view$.grid
("getSelectedRecords");
//Loop through the rows in IG.
for (idx=0; idx < selectedRecords.length; idx++)
{
//To show the value of modal LOV in browser console
//EMP_NAME is the name of the IG column
//.v is used to get the value of the object.
console.log(selectedRecords[idx][model.getFieldKey("EMP_NAME")].v);
}