![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: More Trigger Help Topic Summary: Created On: 25-Jan-2003 04:20 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Does anybody know how to create a trigger on attribute update which tests another attribute? I want to test if a "comments" attribute is filled out when the "Decision" attribute is changed to "Approved", but defaults back to its previous value if the "Comments" remains empty. I don't know whether to use the pre or post attribute modify trigger.
Any ideas? ![]() |
|
![]() |
|
![]() |
|
Looks like it needs to be a "pre save attribute" trigger. The "level" would include the "Decision" attribute: "module -> NameMod -> attribute -> "Decision"
Thus, the trigger fires when "Decision" is ABOUT to be changed. The "pre" part means the trigger is empowered to allow to disallow the change. The body of the trigger may be as attached; keeping in mind that in order to implement a " and a / you need to use extra /. So in DXL "Decision" becomes /"Decision/" in DXL that going into a trigger. - Louie |
|
![]() |
|
![]() |
|
Louis:
... if (ValDecision == "Approved" and null ValComments) set trigPreConFail // Don't let user save the Decision attr else set trigPreConPass Are trigPreConFail and trigPreConPass triggers you write yourself or built-in DOORS triggers you can call up? Janet |
|
![]() |
|
![]() |
|
"Find" them in the DXL online-help (not available from the DXL window, but available from the main DOORS help menu).
They are constants that define the "output" of "pre" triggers. Recall that "pre" means the trigger can decide if the event actually happens. Well, these constants are used to do just that. If you define a "Pre Open Module" trigger and in the trigger sets "preConFail", then the module does NOT open. In this case, preConFail will prevent the "save" from occuring and the user's edits are lost. Just like a function that returns a value (as opposed to a "void" function), you need to set one of these values in all "Pre" triggers. "Post" triggers occur AFTER the event, and have not "output" like this. - Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
More Trigger Help
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.