2016년 8월 2일 화요일

[Forms] Developer 10g Capture All CHANGED Item Values

https://community.oracle.com/thread/2325970?tstart=0

Developer 10g Capture All CHANGED Item Values
---------------------------------------------

My successful POST-UPDATE trigger at the form level ended up like:

<<
p_html := 'Catalog item ' || :ITEMS.MANUFACTURER || ' - ' || :ITEMS.MODEL_DESC || ' ' || :ITEMS.MODEL || ' has been modified and the results are as follows: <br> '; 

v_item := 'ITEMS' || '.' || get_block_property('ITEMS',first_item); 


<<item_loop>> 

loop 
exit when v_item = 'ITEMS' || '.' || null; 
v_dbvalue := GET_ITEM_PROPERTY(v_item,DATABASE_VALUE); 
v_itemname := GET_ITEM_PROPERTY(v_item,ITEM_NAME); 
v_block := 'ITEMS'; 
v_name := v_block || '.' || v_itemname; 
v_frmvalue := NAME_IN(v_name); 
IF v_dbvalue <> v_frmvalue THEN 
p_html := p_html || 'OLD VALUE WAS: ' || v_dbvalue || '<br>AND NEW VALUE IS: ' || v_frmvalue || '<br>'; 
END IF; 
v_item := 'ITEMS' || '.' || get_item_property(v_item,nextitem ); 
>>

The p_html variable is the string that I send to the email package to send out via our mail service.

댓글 없음:

댓글 쓰기