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: Remove columns for a filtered view
Topic Summary:
Created On: 21-Jul-2006 23:56
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.
 21-Jul-2006 23:56
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

I create filtered views for modules each time the module is updated. We need to have only specific columns (about 7) in the filtered view created from the Evaluation view which contains upto 30 columns. I am able to do the filtering using the DBEs. How do I remove the columns not required for the filtered view by DXL code? Presently I am removing them manually.
Thanks in advance.
- Krishna

Report this to a Moderator Report this to a Moderator
 24-Jul-2006 17:27
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

If you know which column you want to be deleted you can use:

delete(column 1) //removes the second column


If you want to search thru the columns for an attribute examine the following code for an approach

Column col
for col in current Module do {
string att = attrName(col)
if (null att) {
if (main(col)) {
print "main\t"
} else {
print dxl(col) "\t"
}
} else {
print att "\t"
}
}
Report this to a Moderator Report this to a Moderator
 25-Jul-2006 22:26
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

Thanks, Ron , for the suggestion. I could not delete the columns by delete(column 1) method, because the column numbers vary after each deletion. I got around the problem by deleting all the columns except column 0 (which I need anyway) and then added the six columns I need. The code is attached.

/* This program creates a module view with the specified number of
   columns. */

Module m = current
Column c
int x = 0
int y
/* First delete all the columns except the first (column 0) in the module will be deleted. Find the number of columns existing in the module.*/
for c in m do {
   x++
}
for y in 1:x-1 do {
   delete column 1
}
print "All columns except column 0 deleted\n"

// Insert a copy of column 0 six times  in the module.
int copyCols
for copyCols in 1:6 do {
   insert (column 0)
}
/* Assign attribute names to the columns 1 to 6.*/

main(column 1)
width(column 1, 400)
attribute(column 2,"Req State")
width(column 2,100)
attribute(column 3,"Requirement Type")
width(column 3,100)
attribute(column 4,"Req History")
width(column 4,100)
attribute(column 5, "Requirement Date")
width(column 5, 120)
attribute(column 6, "Doc/Req Comment")
width(column 6, 150)

print "All columns created.\n"

This may not be an elegant way. I appreciate if another method is suggested.

The above code works fine for some modules. For some modules, the title for the last column (column 6) does not change (it remains the title of the column 0) but the contents of the column are for "Doc/Req Comment" attribute. I am still trying to figure it out what could have happened.

Any suggestions are appreciated.

Report this to a Moderator Report this to a Moderator
 26-Jul-2006 16:41
User is offline View Users Profile Print this message


Krishna Kandala

Posts: 170
Joined: 8-Jul-2006

In connection with this topic, I added
title(column 6, "Doc/Req Control")  and this works fine.

- Krishna
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.