Getting updating value from IG

161 views Asked by At

I need to store the updated value from the IG in the P12_EMPNO page element.

enter image description here

To do this, use this code in DA --- > Run Javascript code

var changedValue = apex.item("N001").getValue();
apex.item("P12_EMPNO").setValue(changedValue);

But the value is not stored in the P12_EMPNO page item.

Note: I only need to save the value I'm updating...

For example: If the value 1003 (already present) is updated to 1004 (update value), I need to store 1004 in P12_EMPNO.

See page 12

Environment:https://apex.oracle.com/pls/apex/

Workspace: shajin_wk

username: Test

pwd: Test@123

1

There are 1 answers

0
Koen Lostrie On BEST ANSWER

Looking at your application, the reason you're getting the error is because of the following attributes in the page process:

  • For the page process, the editable region needs to be set to the interactive grid region.

enter image description here

  • In the page process, use the column names, not the column headings:
DECLARE
  l_emp_collection VARCHAR2(100) := 'PRODUCT_LIST';

begin
    case
        :apex$row_status
        when 'U' then
            apex_debug.info(
                p_message => 'KL Debug: SEQ_ID: %0, N001: %1, N002: %2, C001: %3, QTY: %4',
                p0 => :SEQ,
                p1 => :N001,
                p2 => :N002,
                p3 => :C001,
                p4 => :N003);

            APEX_COLLECTION.UPDATE_MEMBER ( p_collection_name => l_emp_collection,
                                              p_seq => :SEQ,
                                              p_n001 => :N001,
                                              p_n002 => :N002,
                                              p_c001 => :C001,
                                              p_n003 => :N003 );

    end case;

end;

Note that you can use apex_debug to log entries that can be viewed in debug mode.