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: Find and Replace
Topic Summary:
Created On: 14-Sep-2004 17: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.
Answer This question was answered by Antonio Norkus, on Tuesday, September 14, 2004 7:47 PM

Answer:
The following DXL script will do what you need. Just change "My Bool" to the name of your boolean attribute. To run the DXL, in a module select the menu item Tools->Edit DXL... , paste in the code and hit the run button.

Antonio.

-------------
const string booleanAttrName = "My Bool"

Object o
for o in all current Module do
{
if (o.booleanAttrName "" == "False")
{
o.booleanAttrName = null
}
}

 14-Sep-2004 17:32
User is offline View Users Profile Print this message


Charing Maher

Posts: 14
Joined: 5-May-2004

Is there a way to do a find and replace on boolean values (True, False, or left blank)? For example, if I wanted to find all my False values and replace them with blank values. (I only want True values to appear to make it easier to read)

I've tried to use the Find and Replace utility that comes with DOORS, but it keeps telling me that the operation can be performed only on string or text attributes. I am able to manually change False to blank values.


Thanks in advance,
Charing




-------------------------
Charing Maher
Systems Engineer, SAIC
Report this to a Moderator Report this to a Moderator
 14-Sep-2004 18:45
User is offline View Users Profile Print this message


Antonio Norkus

Posts: 109
Joined: 28-Jun-2003

Answer Answer
The following DXL script will do what you need. Just change "My Bool" to the name of your boolean attribute. To run the DXL, in a module select the menu item Tools->Edit DXL... , paste in the code and hit the run button.

Antonio.

-------------
const string booleanAttrName = "My Bool"

Object o
for o in all current Module do
{
if (o.booleanAttrName "" == "False")
{
o.booleanAttrName = null
}
}

Report this to a Moderator Report this to a Moderator
 21-Sep-2004 20:29
User is offline View Users Profile Print this message


Patrick Whalen

Posts: 23
Joined: 2-Sep-2004

Could you not just filter so that "attribute" = True?

Just wondering...

quote:

Originally posted by: Charing Maher
Is there a way to do a find and replace on boolean values (True, False, or left blank)? For example, if I wanted to find all my False values and replace them with blank values. (I only want True values to appear to make it easier to read)

I've tried to use the Find and Replace utility that comes with DOORS, but it keeps telling me that the operation can be performed only on string or text attributes. I am able to manually change False to blank values.


Thanks in advance,
Charing




Edited: 21-Sep-2004 at 20:30 by Patrick Whalen
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.