Hi all,
using ApEx 19.2
The application page has a Master-Detail IG.
When a row is selected from the Master grid, a hidden item value is set using a dynamic action (selection change [interactive grid]). The javascript code used for the DA is
var i, selectedIds = "",
model = this.data.model;
for ( i = 0; i < this.data.selectedRecords.length; i++ ) {
selectedIds += model.getValue( this.data.selectedRecords[i], "MASTER_COLUMN");
}
$s("HIDDEN_ITEM_NAME", selectedIds);
Master Grid allows selecting a single row only, but still somehow I had to use the for loop to make it work. Not sure why.
The Detail Grid is based on a table/view. It has a column which is of type Select List. I want that LOV's SQL Query to be based on the hidden item's value.
So when I change the selection on Master Grid, the hidden item is correctly set (I tested that after changing it to a Text Field) and click Add Row on the Detail Grid, the LOV column is not populated. But after a few clicks in the Master Grid, the detail grid LOV column shows data based on the hidden item.
The behavior is very sporadic and I couldn't figure out when it works and when it does not. Looks like my implementation is wrong.
Please guide how I can base the Detail Grid's LOV column on the column from the Master Grid's selected row.
Thanks and Regards,
RN