获取来自IG的更新数值

huangapple go评论72阅读模式
英文:

Getting updating value from IG

问题

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

要将信息组件中的更新值存储到P12_EMPNO页面元素中。

英文:

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

获取来自IG的更新数值

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

得分: 0

The following content has been translated:

"观察您的应用程序,您出现错误的原因是页面处理中的以下属性:

  • 对于页面处理,可编辑区域需要设置为交互式网格区域。

获取来自IG的更新数值

  • 在页面处理中,请使用列名称,而不是列标题:
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;

请注意,您可以使用apex_debug记录可以在调试模式下查看的条目。

英文:

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.

获取来自IG的更新数值

  • 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.

huangapple
  • 本文由 发表于 2023年5月18日 13:59:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/76278109.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定