Hi,
I'm using Application Express build 19.2.0.00.18. I've created an interactive grid region and defined a dynamic action (Event=Change) on a column (SAL) that changes the value of another column (TAX) with
True Action = Execute PL/SQL Code =
begin
:TAX := :SAL * 0.2;
end;
Item SAL is submitted and item TAX is returned by the action.
When the value of column SAL is changed, the value of column TAX gets updated as expected. I've also defined a rowactionmenu 'Calc Tax' like so:
$(function() {
// listen for view change events to find out when grid views are created
$("#interactivegrid").on("interactivegridviewchange", function(event, data) {
if ( data.view === "grid" && data.created ) {
var view = apex.region("interactivegrid").widget().interactiveGrid("getViews", "grid"),
menu$ = view.rowActionMenu$;
menu$.menu("option").items.push({
type:"action",
label:"Calc Tax",
action: function(menu, element) {
var lCancelEvent;
lCancelEvent = apex.event.trigger('#salCol', 'change');
}
});
}
});
});
Column SAL has static id 'salCol'. When I select the action 'Calc Tax' from the row menu, the dynamic action gets fired (I know this because the first True Action is an alert), but when an attempt is made to execute the PL/SQL Code, an ERR-1002 is raised.
However, when I first manually change the value of the SAL column of any row after initial page load, and then invoke the row action 'Calc Tax', the application behaves as expected.
Any help in understanding the problem is highly appreciated.
Many thanks,
Ibrahim
The 'problem' is reproduced in:
https://apex.oracle.com/pls/apex/f?p=107085:1