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: Delete attribute from current module
Topic Summary: Delete specified attribute from current module
Created On: 13-Dec-2006 16:32
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.
 13-Dec-2006 16:32
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

I am working on a program to find certain attributes in the current module, examine whether any values are entered and then decide whether to delete the attribute from the module. I am finding a problem in passing a variable to the object property to find out whether this has any value.

I am attaching the code. Any suggestions or undocumented code to work around the problem is welcome. The code works if I omit the code to examine the values of the selected attribute for each object of the module.

Thanks in advance
Report this to a Moderator Report this to a Moderator
 13-Dec-2006 16:47
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Your using o.adName as if it was a boolean.

You need to check if the value of each attribute for each object is non-null , if there is a non-null value entered then do not delete else delete.
Report this to a Moderator Report this to a Moderator
 13-Dec-2006 17:39
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

Thanks, Ron, for the clarification. But the point is whether I can use the following code:

for o in m do {
    if (null (o.adName)) {
         continue
    } else {
        ack "The attribute has a value entered \n"
    }
}

If I replace adName with say "Req History", the code works.
Report this to a Moderator Report this to a Moderator
 13-Dec-2006 18:31
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

If I recall correctly here is one of the time when you will have to equate a variable to o.adName
then do the check.
Report this to a Moderator Report this to a Moderator
 13-Dec-2006 23:55
User is offline View Users Profile Print this message


Shawn Stepper

Posts: 96
Joined: 6-Aug-2004

Change this:

if (null (o.adName)) {

to this:

if (null (o.adName) || o.adName "" == "") {



-------------------------
Shawn Stepper
shawn.e.stepper@wellsfargo.com
Report this to a Moderator Report this to a Moderator
 14-Dec-2006 17:20
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

Thanks Shawn for the tip. That makes the code work.

- Krishna
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.