Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
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
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 29-Feb-2008 18:20
User is offline View Users Profile Print this message


Joseph Dubin

Posts: 26
Joined: 1-Mar-2006

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.
Report this to a Moderator Report this to a Moderator
 29-Feb-2008 18:43
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

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
Report this to a Moderator Report this to a Moderator
 29-Feb-2008 18:50
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

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
Report this to a Moderator Report this to a Moderator
 29-Feb-2008 19:00
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 29-Feb-2008 19:21
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

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
Report this to a Moderator Report this to a Moderator
 29-Feb-2008 21:26
User is offline View Users Profile Print this message


Joseph Dubin

Posts: 26
Joined: 1-Mar-2006

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.
Report this to a Moderator Report this to a Moderator
 3-Mar-2008 12:29
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.