![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: warning user when picking a value for a particular attribute Topic Summary: Created On: 29-Feb-2008 18:20 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
We have an attribute which uses an enumerated type with choices High, Medium, Low.
The user can choose one of the values. If the user chooses High or Medium, we want to warn them that they need to enter the reason in the comments field. For example, have a pop-up box come up. I know how to make dialog boxes but don't know how to trigger the appearance of a dialog box based on the value entered for one particular attribute. How would I do this? Is this a trigger, and if so, could you provide any hints on how to write a trigger specific to an attribute? ------------------------- Joseph DUBIN joseph.dubinNOSPAM@freescale.com Freescale Semiconductor, Inc. |
|
![]() |
|
![]() |
|
I think this should work for you. You would create and show your dialog box in the if statement, replacing the print statement.
Keep in mind you will need to escape any " with a \. Edit: Forgot to add you'll need to change Req Level to whatever your attribute is called. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com Edited: 29-Feb-2008 at 18:46 by Scott Boisvert |
|
![]() |
|
![]() |
|
Just another thought....
If it is requried they enter a comment, instead of having the dialog box remind them to enter the comment, I would use the dialog box to force them to enter a comment. Put a check that when they hit the OK button if the comment is empty, then revert the attribute back to what it was previously or warn them and give them the chance to reenter or accept that it will be reverted.. You can do this with a little manipulation of the object's history. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
Adding to Scott ... I'd make it a 'pre' rather than a 'post' event trigger. This allows your controlling DXL to deny the change to the attribute via "set(trigPreConFail)" if the user fails to provide a comment in the box you display.
(That works if the trigger knows its finished when you close the dialog). Triggers are tricky and clumsy and not for DXL new folks. I'd read about Triggers in these forums before you give it a whirl. - Louie |
|
![]() |
|
![]() |
|
Thanks Louie,
That makes more sense then having to go back and search the history. Read...Read...Read... Then experiment.... I'm still not a big fan of triggers, because they can at times mess with other DXL scripts if not implemented correctly. Actually trying to get around an issue like this on my test server before I implement a couple new scripts and triggers. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
|
![]() |
|
Thanks Scott and Louie. I will try this out.
Once it's working, where does one put the trigger code so that all users get it? ------------------------- Joseph DUBIN joseph.dubinNOSPAM@freescale.com Freescale Semiconductor, Inc. |
|
![]() |
|
![]() |
|
It's a persistant trigger so in the example I gave, you just need to be in the project in question and run the script. The trigger is then active on the server so any user accessing that particular attribute within that project, will then be prompted with your warning.
Simply put your users won't need access to the DXL code that implements the trigger once the trigger has been run on the project. ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.