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: Filtering on an empty attribute
Topic Summary:
Created On: 24-Sep-2003 04:47
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.
 24-Sep-2003 04:47
User is offline View Users Profile Print this message


Paul Miller

Posts: 376
Joined: 2-Oct-2002

Hi,

I've posted this on both the Defect Tracking and DXL Exchange forums.

We applied the following filter to a module: "CommentText is empty"

You could imagine our surprise when a number of objects were missing in the filter and we knew that in each case, the contents of attribute "CommentText" was indeed empty. We made specifically sure that there wasn't any stray white spaces hiding away.

There's nothing peculiar about this attribute - it's a Text type attribute with "Generate History" enabled and no Default Value set.

After scratching our heads for a while, we selected an object that was exhibiting this problem, opened the object properties dialogue box and brought up the edit window for attribute "CommentText". As expected, there was nothing to delete so out of desperation we selected the "Reset to Default" button and tried the filter again. Now it's working

Can anyone on this Forum or any Telelogic people who might be browsing indicate why this might be so - I'm also looking for a work around / DXL script that could find these cells and reset them to default so that they are picked up properly by the filter.


-------------------------
Paul Miller
Specification Practices Specialist,
EuroCyber,
Melbourne, Australia.
Mobile: +61 (0)418 135 103
Web Site: http://www.eurocyber.biz
E-mail: miller@eurocyber.biz">pmiller@eurocyber.biz
Report this to a Moderator Report this to a Moderator
 24-Sep-2003 14:17
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

This is a v6+ issue. Enter text and make some of it bold. Save the changes. No "erase" the text. Skeleton rich-text formatting remains. While this formatting produces no results (it appears empty), the actual value of the attribute is NOT empty.

Select an object exhibiting this behavior, then run:
string NameAttr = "CommentText"
Object oCurr = current
string AttrValRich = richtext(oCurr.NameAttr)
string AttrValPlain = oCurr.NameAttr
print "AttrValPlain = >>" AttValPlain "<<\n"
print "AttrValRich = >>" AttrValRich "<<\n"

If I'm right, Plain will be null but Rich will NOT.

You can resolve the issue, at least for now, with the following:

Object oCurr
Module mCurr = current
string NameAttr = "CommentText"

for oCurr in entire mCurr do
{ // if the plain text is empty then erase the attribute
if (null oCurr.NameAttr) oCurr.NameAttr = ""
}

What the heck, do it for Object Text, or perhaps for all Text Attributes.

- Louie
Report this to a Moderator Report this to a Moderator
 25-Sep-2003 01:33
User is offline View Users Profile Print this message


Paul Miller

Posts: 376
Joined: 2-Oct-2002

Thanks Louie,

I suspected that hiddent RTF code words would be the culprit, I hope that v7.0 has cleaned up some of the RTF inconsistencies that abound within v6.0. An interesting twist to this is that if you remove the contents of a text cell via the Object Properties dialogue rather than editing in-place, this problem doesn't occur.

I refined your DXL script - a copy of what I ended up using is shown below.

BTW:- A warning to any DOORS users who also use Telelogic's DocExpress to publish DOORS modules within MSWord.

When using the "Pre-defined view" method of publication, whenever DocExpress experiences a text cell that has no visible text but has these hidden RTF code words sitting inside it, DocExpress loses its reference point and the contents of all subsequent columns in that row are left shifted by one cell ie: they don't appear within the correct column. We fortunately stumbled on this problem just in time to manually correct a number of documents in a tender response to a prospective customer.

//DXL Script to isolate and remove hidden RTF code words from text cells that contain no text.

string NameAttr = "_Compliance Comment"
string AttrValRich
string AttrValPlain
string UID

Object oCurr
Module mCurr = current

for oCurr in entire mCurr do {

AttrValRich = richText(oCurr.NameAttr)
AttrValPlain = oCurr.NameAttr
UID = identifier(oCurr)
print UID " AttrValPlain = >>" AttrValPlain "<<\n"
print UID " AttrValRich = >>" AttrValRich "<<\n"


if ((null AttrValPlain) && (!null AttrValRich)) {
oCurr.NameAttr = richText("")
print "Hidden RTF cleaned out from empty attr. \n\n"
}
else {
print "Cleaning not required.\n\n"
}
}


-------------------------
Paul Miller
Specification Practices Specialist,
EuroCyber,
Melbourne, Australia.
Mobile: +61 (0)418 135 103
Web Site: http://www.eurocyber.biz
E-mail: miller@eurocyber.biz">pmiller@eurocyber.biz
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.