dynamically changing the APEX_ITEM. TEXT value in Oracle apex

江枫思渺然 提交于 2019-12-05 05:56:13

问题


I have an application where I have created classic report. it has 4 columns.

SELECT KEY,  
  APEX_ITEM.TEXT(6,attribute3,10) attribute3,  
  APEX_ITEM.HIDDEN(3,KEY) ||  
  APEX_ITEM.TEXT(4,attribute1, 10) attribute1,  
  APEX_ITEM.TEXT(5,attribute2, 10) attribute2    
FROM table1 ;

I want to dynamically change the value for attribute2 based on attribute1.

attribute2 = attribute3*attribute1, where attribute3 will be pre-fetched and attribute1 will be entered by user.

I want to calculate attribute3 on-fly(dynamically), based on changes in attribute1.

Version: 4.2.1


回答1:


You can do this with a (moderately complex) dynamic action as follows.

  1. Action fires when the user changes any element with name "f06" (i.e. attribute3 which you have defined with p_idx=>6).

  1. The action taken is to run some Javascript that finds the other 2 elements named "f04" and "f05" in the same row, get the value of the "f04" and "f06" elements, multiply them and store the result in the "f05" element.



来源:https://stackoverflow.com/questions/36003828/dynamically-changing-the-apex-item-text-value-in-oracle-apex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!