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: Using calendar on attribute column
Topic Summary:
Created On: 27-Jun-2007 17:48
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.
 27-Jun-2007 17:48
User is offline View Users Profile Print this message


Brian Rohler

Posts: 26
Joined: 20-Jun-2007

When viewing a module, I want to make a calendar pop up whenever a user edits an attribute of type Date. The date function utilizes a calendar, but it returns a DBE that I can't seem to make work with the Module window itself, under the Date attribute column. A couple possibilities that I've been toying around with (unsuccessfully so far) have been triggers and DXL Attributes. Anyone have suggestions?
Report this to a Moderator Report this to a Moderator
 25-Apr-2008 11:03
User is offline View Users Profile Print this message


Laura Aldred

Posts: 9
Joined: 25-May-2006

Has anyone managed to do this?

I would like to be able to double click on an attribute 'To be completed by', which is set as a Date, which would then open a form with the calendar drop down menu (I have already created this) which would then populate the attibute selected. This would be useful to ensure the data is consistent when using searching/filter/sort functions.

I have tried Reik's Calendar but get 5 dxl errors regarding undeclared variables and incorrectly concatenated tokens. Running v8.3.

Any help gratefully received!

Laura

-------------------------
Laura Aldred

Requirements Controller
Marshall of Cambridge Aerospace Ltd, UK
Report this to a Moderator Report this to a Moderator
 25-Apr-2008 11:19
User is offline View Users Profile Print this message


Peter Albert

Posts: 232
Joined: 30-Dec-2005

The latest version of the calendar posted here
had one undeclared integer variable in line 113: Just replacing

ye_w = width(canv, ye"") with
int ye_w = width(canv, ye"")

worked perfectly fine for me.

Peter
Report this to a Moderator Report this to a Moderator
 25-Apr-2008 11:43
User is offline View Users Profile Print this message


Laura Aldred

Posts: 9
Joined: 25-May-2006

Thank you! That seems to have solved the problem!

Any advice on how to get a trigger to open it from an attribute and then put the selected date in the attribute column??

Laura

-------------------------
Laura Aldred

Requirements Controller
Marshall of Cambridge Aerospace Ltd, UK
Report this to a Moderator Report this to a Moderator
 25-Apr-2008 14:36
User is offline View Users Profile Print this message


Peter Albert

Posts: 232
Joined: 30-Dec-2005

Well, triggers are not for the faint-hearted ...

Having said this, please find attached a small script which can deploy and delete a persistent attribute post-save trigger which calls the calendar DBE when the user tries to modify the attribute.

It has a big caveat, though:

as far as I know, there is no trigger which is activated by a double-click. On attribute level, there is only the possibility of a pre-save or post-save trigger, which means the user must type something into the attribute column (or delete the current entry) in order to fire the trigger. If the attribute is of type date, the entry must be of the correct format, hence, if you just type "1" in order to fire the trigger, all you get is an error message.

If you still want to give the script a try, you must alter two settings in the file:

1) set the value of the string variable "attName" to the correct attribute name for which you want the trigger to fire

2) make the include statement point to the correct place in your installation where you have put the calendar include file


Then, you must call the file once from the DXL command line in the module where you want the trigger to be saved. Press the "Deploy" button.

If anything goes wrong when the trigger fires, or if you want to delete the trigger for any other reason, or if you want to modify the DXLCode being executed when the trigger fires, you can do so by running the script again and pressing the "Delete" button.


Never change the trigger name variable between deploying and deletion!

Good luck!

Peter




Edited: 25-Apr-2008 at 14:37 by Peter Albert
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.