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 layout DXL column???
Topic Summary:
Created On: 8-Jan-2007 17:59
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.
 8-Jan-2007 17:59
User is offline View Users Profile Print this message


Marlin Wegner

Posts: 20
Joined: 2-Jun-2006

I have a column in a module that is populated using layout DXL which acquires the value(s) for this column from another module.  The name the column has been given is: PUID (linked from other module)

If I were to look at the text of a Filter that I create "manually"  using the Filtering mechanism and selecting Columns,  I get a string that looks something like the following :

Column 'PUID (linked from other module)' contains "845677"

the 845677 is the string that I am filtering for.  

I have tried to translate this into DXL, but I am at a loss.    Can anyone point me in a direction where I can find something documented on writing DXL filters for columns.   Especially when the column is populated using layout DXL.  

By the way the following does not work as contains expects an attribute

contains( Column( 'PUID (linked from other module)' ),  "845677" )

OR

contains( Column( "PUID (linked from other module)" ),  "845677" )

Also the following does not work (column(0) is the column of interest in the view) :

contains( attribute attrName(column(0),  "845677" )

as attrName returns a null because the column is Layout DXL and not associated with an attribute name.



 




Thanks!



Edited: 8-Jan-2007 at 18:10 by Marlin Wegner
Report this to a Moderator Report this to a Moderator
 8-Jan-2007 18:18
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

The only way I know of is to do an accept/reject filter.  But you can't save that filter(for a view lets say).  You have run it every time.

Basically you scan through each object looking for certain values.  If the object has the correct value in the correct attribute you accept it.  Otherwise you reject it.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 9-Jan-2007 00:06
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

I think you need to get the text of each object displayed, and then decide what to fillter explicitely as David suggests. IIRC you cannot retrieve the object-column value unless the object is currently displayed; thus the attached turns off any filter before continuing. Attached should get you started.

You could possibly modify the attached using these commands (note inclusion of 'entire')
for obj in entire mCurr do
{ if (!isVisible(obj)) reject obj
elseif(isDeleted(obj)) reject obj
else // get the value and consider it
}

- Louie
Report this to a Moderator Report this to a Moderator
 9-Jan-2007 22:55
User is offline View Users Profile Print this message


Marlin Wegner

Posts: 20
Joined: 2-Jun-2006

I stumbled into very much the same code as Louie posted above, but my particular problem was a bit more complicated.   The Layout DXL column contained multiple entries for each object.    Also I was given a specific list of items that may be found in the Layout DXL that is of particular interest.     What I did was read in the list,  stuff that list into a Skip list with the key being the number of interest and the value being a string which contained the value of either "true" or "false" (actually, initially I set all values to false).   The t/f values were to keep track of anything that may have been provided in the list that may not be found in the view.     Next I stepped through each object, obtaining the text from the Layout DXL column and broke it into individual strings.   I looked for each of these strings in the skip list,  if I found a string in the skip list, I accepted the object and marked the skip list value with true, if I didn't find the value, I rejected the object and left it marked as false.    At the end of processing all objects,  I output the items I could not find.   I packaged it all up into a GUI to allow the user ro select the input CSV file and view the Not Found items.     I would post the code, however I work on a system where my development box is never exposed to the outside world.

Thanks, for the input and suggestions!

Report this to a Moderator Report this to a Moderator
 30-Jan-2008 22:39
User is offline View Users Profile Print this message


Catherine Darrow

Posts: 5
Joined: 13-Nov-2007

You want the following DXL function:

Filter column(string column_title, string contents, [bool case_sensitive, bool regexp])

Edited: 30-Jan-2008 at 22:43 by Catherine Darrow
Report this to a Moderator Report this to a Moderator
 31-Jan-2008 16:20
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Almost all DOORS menu functions are written in DXL, so if the filter dialog can do it so can I. I searched through doors.exe and found some commands that I don't see in the manual. 'Filter column(string, string)' is the basic function of interest.

The attached might get you started.

I imagine there is some difficulty insuring that you know the name of a column. I notice that when you specify a column that doesn't exist, no error is generated and you get no results. I notice that if there are two columns with the same title, the left most one it used ignoring the right one.

If you turn this into something useful, consider posting it.

- Louie
Report this to a Moderator Report this to a Moderator
 31-Jan-2008 16:24
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Doh! Didn't see your post before I posted mine. Didn't mean to steal your thunder, sorry.
Report this to a Moderator Report this to a Moderator
 31-Jan-2008 16:29
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Doh! I see the function exists in v8.1 but didn't make into the DXL manual until v8.2. I'm still using v8.1.
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.