Filtering on an attribute using multiple lines of text

I am new to using DOORS and I was trying to filter on a single attribute, but with multiple lines of text. For example, if I was going to run a filter on 'ID#' and I needed to see a specific set of ID#'s out of hundreds of other numbers. Is there some type of code that I could right in DXL that would keep me from having to add each # in 'filter properties' window?
JGamble - Thu Dec 03 15:39:23 EST 2009

Re: Filtering on an attribute using multiple lines of text
doors36677 - Thu Dec 03 16:02:42 EST 2009

Since you are not sure what you want -- perhaps the best starting point for you is to look in dxl file for function: reject

There you will find a simple demo dxl script to accept and reject objects.

Re: Filtering on an attribute using multiple lines of text
kbmurphy - Thu Dec 03 20:07:49 EST 2009

You are doing it wrong.

If, out of hundreds of objects, you need to filter objects 5, 38, 243, 786, and 1046, then those objects must have something in common, and perhaps need an attribute created so that you can keep track of these objects.

Yes, there are ways of saying "if the absolute number is 5, or 38, or 243, or 786, or 1046, then accept it in the filter and show me), but if you're doing this often, you are doing it wrong.

Even your question is misleading--you are just wanting to filter multiple objects easily, not multiple lines of text.

I hate to sound like a broken record, but you are in obvious need of a DOORS expert so you don't waste your time and save hours of frustration. I don't mean to sound elitist--I'm just saying you need help. You don't have the basics down and you're talking DXL already!

Consider a consultant. I won't even plug my own company.

Re: Filtering on an attribute using multiple lines of text
doors36677 - Fri Dec 04 06:59:43 EST 2009

kbmurphy - Thu Dec 03 20:07:49 EST 2009
You are doing it wrong.

If, out of hundreds of objects, you need to filter objects 5, 38, 243, 786, and 1046, then those objects must have something in common, and perhaps need an attribute created so that you can keep track of these objects.

Yes, there are ways of saying "if the absolute number is 5, or 38, or 243, or 786, or 1046, then accept it in the filter and show me), but if you're doing this often, you are doing it wrong.

Even your question is misleading--you are just wanting to filter multiple objects easily, not multiple lines of text.

I hate to sound like a broken record, but you are in obvious need of a DOORS expert so you don't waste your time and save hours of frustration. I don't mean to sound elitist--I'm just saying you need help. You don't have the basics down and you're talking DXL already!

Consider a consultant. I won't even plug my own company.

I think I shall forever trimble in fear if I have to ask a question on this forum for the fear of receiving the wrath of Kevin.

Re: Filtering on an attribute using multiple lines of text
kbmurphy - Fri Dec 04 11:33:15 EST 2009

doors36677 - Fri Dec 04 06:59:43 EST 2009
I think I shall forever trimble in fear if I have to ask a question on this forum for the fear of receiving the wrath of Kevin.

FYI, I asked a question here yesterday about Attribute DXL that I couldn't quite figure out. I have yet to test the proposed solutions, but even a so-called expert like me sometimes needs help.

I don't mean to discourage questions...I don't feel I attacked the original poster. It IS one of the frustrating things about DOORS offering DXL, though, that people think they need to jump in and start coding when they don't even know what the true issue is.

For instance, doors36677 answered her question, but I don't think he solved her problem. Her problem is obviously that she doesn't know what she's doing, and from there, jumping straight into DXL is not going to help her. She's new to DOORS and needs an attribute and doesn't know it. If she were more of an expert, then there are some times (though they should be few and far between) when she may need an ad-hoc type of filter. It's just that the way her question was asked from the get go does NOT imply that she needs an ad-hoc type of filter, but rather an attribute.

There is no wrath--people simply need to know when they are in over their head, in my opinion.

Re: Filtering on an attribute using multiple lines of text
llandale - Mon Dec 07 17:01:26 EST 2009

Murphy might be right but is jumping to conclusions to quickly. Doors36677 is also right, except that 'Trimble' was a Confederate General who never 'Trembled' at the sight of Billy yank.

While you cannot do this with the GUI, DXL allows for a 'filter' composed of individual accepting or rejecting for each object. The code looks something like this:

Module mod = current
filtering(off)
for obj in entire mod do
{  if (this object qualifies)
        accept obj
   else reject obj
}
filtering on


You have to write the code that qualifies the object. Perhaps:
int AbsNo = obj."Absolute Number"
if (!isDeleted(obj) and
(AbsNo == 22 or
AbsNo == 34 or
AbsNo == 43 etc))

Usually, its something in the Text or the existence of some link.

You cannot save this kind of filter in a view. ..err.. I mean the saved view doesn't remember this kind of filter.

 

 

  • Louie