insert - Trigger update does not work when creating a new request -


i new db oracle, when create new request in clarity (that project & portfolio management application) or when change status of request, update field status new value of mb_status_idea.

the following query works in case of update, if create new request, not update status. (so status not equal status mb).

if ( :old.mb_status_idea != :new.mb_status_idea)   update inv_investments  set a.status = stat  a.id=:new.id ; end if; 

i think problem when creating new request, since insert trigger old contains no value, condition false , doeas not update status.

note: field status in table inv_invetments , (stat := :new.mb_status_idea) , database column status mb mb_status_idea

i added condition --> or (:old.mb_status_idea null), again when create new request, value of "status" , "status mb" different (status not updated).

i appreciate if overcome problem.

all ideas highly appreciated,

mona

with clarity recommended not use triggers couple of reasons... jobs , processes may change values of fields @ other times when edits happen through application. can't control these. triggers can't used if use ca hosting services. triggers have removed upgrades because upgrade process breaks them.

for type of action recommend using process engine. can setup process run time field updated. update performed custom script or system action. system action straight forward configure. if use custom script there examples in admin bookshelf documentation. write sql update statement , put in gel script.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -