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: Translating a shown filter into a DXL command
Topic Summary:
Created On: 28-Sep-2004 15:48
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 Kirk Walker, on Friday, October 1, 2004 1:57 AM

Answer:
Well, the following did the same thing but not in the way I had hoped. I ended up using attributeDXL for the variable of multiSpecOb so that it was an enumerated type.
I then could do the following:
f1 = contains(attribute multiSpecOb, filterValue1, true)
if (filterValue2 != null) {
f2 = contains(attribute multiSpecOb, filterValue2, true)
f3 = f1 || f2
} else f3 = f1
set f3
filtering on
 28-Sep-2004 15:48
User is offline View Users Profile Print this message


Kirk Walker

Posts: 32
Joined: 18-Sep-2004

I displayed the current string using "stringOf(current Module, fltCurr)" where fltCurr is the current filter. I ended up with
(Column 'mspecobjs' contains "IPT all" (case sensitive)) OR (Column 'mspecobjs' contains "IPT 1" (case sensitive))

Where "IPT all" and "IPT 1" are multi variable attributes and the column that is entitled "mspecobjs" uses layout DXL to get its contents because it is actually pulling in the current data from a multivar in another module. There are no attributes in the column being displayed.

I can filter (as cited above) and get the desired results, but I need to be able to declare that filter in DXL for a number of views, using variables for the "IPT x"s.

Stuff like the following does not work because "contains" is expecting an attribute:
string filterValue1 = "IPT 1"
cols = ""
string brk = ""
cols = cols brk "'" columnValue "'"
Filter f3 = attribute contains(cols, filterValue1, true)
// nor does Filter f3 = contains(cols, filterValue1, true)

Any thoughts? I am currently playing with attribute DXL in hopes of getting an attribute value that can then be filtered. I am open to suggestions.
Thx!

Edited: 28-Sep-2004 at 16:00 by Kirk Walker
Report this to a Moderator Report this to a Moderator
 28-Sep-2004 16:04
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Haven't done much defined filtering (all my filters simply go through through the module and accept/reject each object in turn).

But I do know that your likely to have trouble having AttrDXL or LayoutDXL decide whether or not the current object should be displayed; and you cannot have them turning filtering on or off. This is because they generally use variable "obj" to mean the object being calculated, but that gets confused because its tied loosely to the notion of the "current" object (which can change depending on filtering).

- Louie
Report this to a Moderator Report this to a Moderator
 28-Sep-2004 16:48
User is offline View Users Profile Print this message


Kirk Walker

Posts: 32
Joined: 18-Sep-2004

The reason I have the filtering based on layout DXL is because of the following:

Module x has a multiEnumerated type. Users have views based on this type. When a CP is generated for an object in module x, an object is created in CP4x. There is a need to have a similar filtering in CP4x based on the enumeration values of the target (linked) object.

I can't copy the module attributes over because it is a one-time copy. If an additional CP is generated, it would not be updated. That is why I used a column which employed layout DXL. I can then filter CP4x on this column. The problem is, I can't figure out how to make DXL code to generate the same filter as is generated from the filter menu.
filter for view of "IPT 1" is: (Column 'mspecobjs' contains "IPT all" (case sensitive)) OR (Column 'mspecobjs' contains "IPT 1" (case sensitive))

If I can not figure out how to create DXL that will create various filters like the one above, then I was wondering if attributeDXL might give me a filterable attribute, but then I have to figure out how to get the attribute stuffed with the right value.

Edited: 28-Sep-2004 at 16:55 by Kirk Walker
Report this to a Moderator Report this to a Moderator
 1-Oct-2004 01:57
User is offline View Users Profile Print this message


Kirk Walker

Posts: 32
Joined: 18-Sep-2004

Answer Answer
Well, the following did the same thing but not in the way I had hoped. I ended up using attributeDXL for the variable of multiSpecOb so that it was an enumerated type.
I then could do the following:
f1 = contains(attribute multiSpecOb, filterValue1, true)
if (filterValue2 != null) {
f2 = contains(attribute multiSpecOb, filterValue2, true)
f3 = f1 || f2
} else f3 = f1
set f3
filtering on
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.