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: Show User that changed an attribute
Topic Summary: Is there a script that will show the user that changed an attribute?
Created On: 17-Jan-2007 01:55
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.
Answer This question was answered by Paul Worrall, on Thursday, January 18, 2007 4:52 PM

Answer:
I should have known to try it for myself before posting! Here's a script that works for me:
 17-Jan-2007 01:55
User is offline View Users Profile Print this message


Valori Zaffino

Posts: 4
Joined: 11-May-2005

I'm trying to create a validation view.
I have a pick list with one of the items being 'approved'
I would like to add a column showing who selected approved.
Could I base that column on an attribute based on a DXL script that could tell me who changed the other attribute?????

Or is there some easy way that I completely missed???
Thanks,
Val
vzaffino@parker.com

Report this to a Moderator Report this to a Moderator
 17-Jan-2007 09:59
User is offline View Users Profile Print this message


Paul Worrall

Posts: 87
Joined: 30-Sep-2003

Try something like this in a layout DXL column:
Report this to a Moderator Report this to a Moderator
 17-Jan-2007 17:05
User is offline View Users Profile Print this message


Valori Zaffino

Posts: 4
Joined: 11-May-2005

Thanks for your help - but.. I'm not sure what went wrong
I put this in the dxl area

History h

string lastApprovedBy = ""

for h in obj do {

if h.attrName == "ReqValidation Status" && h.newValue "" == "Approved" then lastApprovedBy = h.author

}

display lastApprovedBy

----------------------------------------------------------------------------------
Then as soon as I add an object I recieve a DXL Interaction window with this in the DXL output box

-R-W- DXL: <Line:4> wrong history type createObject for attribute name

-R-W- DXL: <Line:4> wrong history type createObject for attribute name

I've tried to approve the object to see if that would fix it but it just creates a loop until I delete the object.

Do you have time for more help?
Thanks,
Val

Report this to a Moderator Report this to a Moderator
 17-Jan-2007 17:20
User is offline View Users Profile Print this message


Paul Worrall

Posts: 87
Joined: 30-Sep-2003

Adding the line:

if h.type != modifyObject then continue

before the line that begins "if h.attrName ==" will fix that bug.
Report this to a Moderator Report this to a Moderator
 17-Jan-2007 17:42
User is offline View Users Profile Print this message


Valori Zaffino

Posts: 4
Joined: 11-May-2005

No more error but no results either  
I've tried creating the attribute with type string and with type user. Once its created the type choice is grayed out so I don't know if it makes a difference. Neither one worked.
Do appreciate your time though - Thanks
Report this to a Moderator Report this to a Moderator
 18-Jan-2007 10:48
User is offline View Users Profile Print this message


Paul Worrall

Posts: 87
Joined: 30-Sep-2003

Answer Answer
I should have known to try it for myself before posting! Here's a script that works for me:
Report this to a Moderator Report this to a Moderator
 18-Jan-2007 16:54
User is offline View Users Profile Print this message


Valori Zaffino

Posts: 4
Joined: 11-May-2005

Finally, I got it. All this time I was trying to create it as an attribute, then display the attribute. When I finally put your code in as a column display dxl script it worked perfectly.  Thanks so much for your help.  They'll love this!
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.