![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Filtering on an empty attribute Topic Summary: Created On: 24-Sep-2003 04:47 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Filtering on an empty attribute
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.