Cannot Delete Table Row - incomming link on an INVISIBLE object in the row

Objective: to delete a row from a table in module B. The row contains 1 object, object b1, and no visible incomming links.

Problem (and I quote): "cannot delete - object(s) have 1 incomming link (via link module A-B to object b2 from module A:a3)"

Object b2??? Where is object b2. Oh no, there isn't one.

Purge A, B, A-B, open them all read/write, goto b1 (it works), goto b2 (not found).

How can I delete this link so that I can delete the table row?

A clue?... there seems to be an unused object ID that fits at the end of every table row. Does DOORs use this object ID to manage the table in some way?

I thought about: access permissions, child objects (doesn't apply to tables?)

All help much appreciated.
SystemAdmin - Wed Jun 03 07:44:11 EDT 2009

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
IBM_Gust - Wed Jun 03 07:55:58 EDT 2009

You say "Where is object b2. Oh no, there isn't one. "

Yet DOORS says "object(s) have 1 incoming link (via link module A-B to object b2 from module A:a3)".

Which do you think is most likely to be most knowledgeable?

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
mcnairk - Wed Jun 03 08:05:33 EDT 2009

IBM_Gust - Wed Jun 03 07:55:58 EDT 2009
You say "Where is object b2. Oh no, there isn't one. "

Yet DOORS says "object(s) have 1 incoming link (via link module A-B to object b2 from module A:a3)".

Which do you think is most likely to be most knowledgeable?

Have you tried purging deleted objects?

Ken.

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
kierant - Wed Jun 03 08:48:08 EDT 2009

Doors does use internal/hidden objects for each table and each row in each table, but I don't think you can build links to those objects or that that could be your problem. Instead, it sounds like your table row contains an object b2 that has been soft deleted but whose link it still present (as object on other side of the link, in module A, does still exist). Hence, if you haven't already done so, suggest you "view/ show/ deleted objects" in module B, then see if a deleted object b2 came up (or try to "goto" it). If not, maybe the link module contains details of the troublesome link.

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
SystemAdmin - Wed Jun 03 09:13:38 EDT 2009

IBM_Gust - Wed Jun 03 07:55:58 EDT 2009
You say "Where is object b2. Oh no, there isn't one. "

Yet DOORS says "object(s) have 1 incoming link (via link module A-B to object b2 from module A:a3)".

Which do you think is most likely to be most knowledgeable?

Unhelpful. Don't under-estimate my ability to diagnose computer faults, I've been doning it since 1981.

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
SystemAdmin - Wed Jun 03 09:15:12 EDT 2009

mcnairk - Wed Jun 03 08:05:33 EDT 2009
Have you tried purging deleted objects?

Ken.

Yes, I tried purging objects;- didn;t seem to be helpful.

It seems to mean that I can no longer view deletions.

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
SystemAdmin - Wed Jun 03 09:21:08 EDT 2009

kierant - Wed Jun 03 08:48:08 EDT 2009
Doors does use internal/hidden objects for each table and each row in each table, but I don't think you can build links to those objects or that that could be your problem. Instead, it sounds like your table row contains an object b2 that has been soft deleted but whose link it still present (as object on other side of the link, in module A, does still exist). Hence, if you haven't already done so, suggest you "view/ show/ deleted objects" in module B, then see if a deleted object b2 came up (or try to "goto" it). If not, maybe the link module contains details of the troublesome link.

I thought it might, because the object number for the first cell in each row increments by 3, but there are only 2 columns.
The point is that object b2 is one of the missing object ID's; and the error report states that this is where the incomming link is. So, it seems likely to be true; although as you say, there is no normal way to create a link on these objects.

I can't view deletions (as I have purged?). However, I have been back to the previous baseline. Unfortunatly, no deletions or other evidence of b2 was found there either.

Still a bit of a mystery.

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
mcnairk - Wed Jun 03 09:38:21 EDT 2009

SystemAdmin - Wed Jun 03 09:21:08 EDT 2009
I thought it might, because the object number for the first cell in each row increments by 3, but there are only 2 columns.
The point is that object b2 is one of the missing object ID's; and the error report states that this is where the incomming link is. So, it seems likely to be true; although as you say, there is no normal way to create a link on these objects.

I can't view deletions (as I have purged?). However, I have been back to the previous baseline. Unfortunatly, no deletions or other evidence of b2 was found there either.

Still a bit of a mystery.

How many cells in the table, how many links, and how many attributes would you have to set? If not many, maybe it is easier to rebuild the table from scratch, although you will obviously loose the history.

I don't like DOORS tables and try to avoid them if possible. If we don't require to link to rows or cells, we use an embedded Word table; if we do, we split the table into separate objects. DOORS is a table; to properly display a table within a table you really need a third dimension.

Ken.

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
Peter_Albert - Wed Jun 03 10:11:20 EDT 2009

SystemAdmin - Wed Jun 03 09:21:08 EDT 2009
I thought it might, because the object number for the first cell in each row increments by 3, but there are only 2 columns.
The point is that object b2 is one of the missing object ID's; and the error report states that this is where the incomming link is. So, it seems likely to be true; although as you say, there is no normal way to create a link on these objects.

I can't view deletions (as I have purged?). However, I have been back to the previous baseline. Unfortunatly, no deletions or other evidence of b2 was found there either.

Still a bit of a mystery.

Tables are constructed hierarchically in three levels:

Level 1: The table object. It is visible when "Showing table cells" is turned off, the main column reads ">> Table" for those objects. If table cells are visible, the table object is hidden.

Level 2: Row objects. Row objects are never visible, but accessible by DXL via the "for rowObj in tabObj do" loop

Level 3: Cell objects. Visibility is exactly opposite to the table object.

When you have selected a table cell, you can use the code snippet below to loop through the table object and all row objects and delete incoming links when there are any.

Make sure that the source module in question (the one from your error message) is open in edit mode before you call the script.


Object currObj = current Object 

if (!cell currObj)
{infoBox 
"Select a table cell"; halt
} Object tabObj = getTable currObj Object rowObj, cellObj Link l 

for l in tabObj <- 
"*" 

do 
{ 

if (confirm(
"Delete link to table object?"))
{delete l
} 
} 

for rowObj in tabObj 

do 
{ obj -> rowObj 

for l in rowObj <- 
"*" 

do 
{ 

if (confirm(
"Delete link to row object?"))
{delete l
} 
} 

for cellObj in rowObj 

do 
{ 
// This is just to illustrate how you  
// would loop through the cells in one row 
} 
}


Regards,

Peter

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
llandale - Wed Jun 03 10:38:54 EDT 2009

Its possible you have a deleted cell with a link, showing deleted objects will help.

There is an invisible table header object for each table. There is an invisible row header object for each row. The row is 'below' the table; each cell is 'below' its row. You can see these objects as follows in DXL:

Object o 

for o in entire (current Module) 

do 
{  

if    (table(o)) print 
"Table\t\t\t" (identifier(o)) 
"\t l-" (level(o)) 
"\t" (number(o)) 
"\n" elseif(row(o))   print 
"\tRow\t\t"   (identifier(o)) 
"\t l-" (level(o)) 
"\t" (number(o)) 
"\n" elseif(cell(o))  print 
"\t\tCell\t"  (identifier(o)) 
"\t l-" (level(o)) 
"\t" (number(o)) 
"\n" 
}


It makes no sense to have links associated with table or row objects, but it appears you have done so.

Once you get a handle on a row(o) or a table(o), you can loop through its outlinks and delete the outlink. You can also loop through the in-links but you'll have to figure out the source module and make sure its open Edit before deleting the link.

  • Louie

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
SystemAdmin - Thu Jun 04 04:26:21 EDT 2009

mcnairk - Wed Jun 03 09:38:21 EDT 2009
How many cells in the table, how many links, and how many attributes would you have to set? If not many, maybe it is easier to rebuild the table from scratch, although you will obviously loose the history.

I don't like DOORS tables and try to avoid them if possible. If we don't require to link to rows or cells, we use an embedded Word table; if we do, we split the table into separate objects. DOORS is a table; to properly display a table within a table you really need a third dimension.

Ken.

Rebuilding table would require deleting the old table; back to the exam question.
Rebuilding the whole formal module would take weeks.

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
SystemAdmin - Thu Jun 04 04:52:33 EDT 2009

llandale - Wed Jun 03 10:38:54 EDT 2009
Its possible you have a deleted cell with a link, showing deleted objects will help.

There is an invisible table header object for each table. There is an invisible row header object for each row. The row is 'below' the table; each cell is 'below' its row. You can see these objects as follows in DXL:


Object o 

for o in entire (current Module) 

do 
{  

if    (table(o)) print 
"Table\t\t\t" (identifier(o)) 
"\t l-" (level(o)) 
"\t" (number(o)) 
"\n" elseif(row(o))   print 
"\tRow\t\t"   (identifier(o)) 
"\t l-" (level(o)) 
"\t" (number(o)) 
"\n" elseif(cell(o))  print 
"\t\tCell\t"  (identifier(o)) 
"\t l-" (level(o)) 
"\t" (number(o)) 
"\n" 
}


It makes no sense to have links associated with table or row objects, but it appears you have done so.

Once you get a handle on a row(o) or a table(o), you can loop through its outlinks and delete the outlink. You can also loop through the in-links but you'll have to figure out the source module and make sure its open Edit before deleting the link.

  • Louie

Thanks, that was pretty handy... see response to Louie below.

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
SystemAdmin - Thu Jun 04 04:59:30 EDT 2009

Peter_Albert - Wed Jun 03 10:11:20 EDT 2009
Tables are constructed hierarchically in three levels:

Level 1: The table object. It is visible when "Showing table cells" is turned off, the main column reads ">> Table" for those objects. If table cells are visible, the table object is hidden.

Level 2: Row objects. Row objects are never visible, but accessible by DXL via the "for rowObj in tabObj do" loop

Level 3: Cell objects. Visibility is exactly opposite to the table object.

When you have selected a table cell, you can use the code snippet below to loop through the table object and all row objects and delete incoming links when there are any.

Make sure that the source module in question (the one from your error message) is open in edit mode before you call the script.


Object currObj = current Object 

if (!cell currObj)
{infoBox 
"Select a table cell"; halt
} Object tabObj = getTable currObj Object rowObj, cellObj Link l 

for l in tabObj <- 
"*" 

do 
{ 

if (confirm(
"Delete link to table object?"))
{delete l
} 
} 

for rowObj in tabObj 

do 
{ obj -> rowObj 

for l in rowObj <- 
"*" 

do 
{ 

if (confirm(
"Delete link to row object?"))
{delete l
} 
} 

for cellObj in rowObj 

do 
{ 
// This is just to illustrate how you  
// would loop through the cells in one row 
} 
}


Regards,

Peter

Name mix up apology. Anyway, Peter...
I just used this DXL hybrid...


Object currObj = current Object 

if (!cell currObj)
{infoBox 
"Select a table cell"; halt
} Object tabObj = getTable currObj print 
"Table\t\t\t" (identifier(tabObj )) 
"\t l-" (level(tabObj )) 
"\t" (number(tabObj )) 
"\n"   Object rowObj, cellObj Link l 

for l in tabObj <- 
"*" 

do 
{ 

if (confirm(
"Delete link to table object?"))
{delete l
} 
} 

for rowObj in tabObj 

do 
{ 
// obj -> rowObj  This gave an error, so I commented it out, and rowObj seems to be set up ok without it. print 
"\tRow\t\t" (identifier(rowObj)) 
"\t l-" (level(rowObj)) 
"\t" (number(rowObj)) 
"\n" 

for l in rowObj <- 
"*" 

do 
{ print 
"link found on row object" 

if (confirm(
"Delete link to row object?"))
{delete l
} 
} 

for cellObj in rowObj 

do 
{ 
// This is just to illustrate how you  
// would loop through the cells in one row 
} 
}


And here is the output;

Table SMS_PFS_638 l-5 2.2.1.3.0-1
Row SMS_PFS_639 l-6 2.2.1.3.0-1.0-1
Row SMS_PFS_642 l-6 2.2.1.3.0-1.0-2
Row SMS_PFS_645 l-6 2.2.1.3.0-1.0-3
Row SMS_PFS_648 l-6 2.2.1.3.0-1.0-4
Row SMS_PFS_651 l-6 2.2.1.3.0-1.0-5
Row SMS_PFS_654 l-6 2.2.1.3.0-1.0-6

Oh, seems like no incomming links on object 651. Great, I'll delete it...

"cannot delete - object(s) have 1 incomming link (via A-B to object 651 from A:a1)"

So perhaps the dxl is not quite right?

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
Peter_Albert - Thu Jun 04 05:36:58 EDT 2009

SystemAdmin - Thu Jun 04 04:59:30 EDT 2009
Name mix up apology. Anyway, Peter...
I just used this DXL hybrid...


Object currObj = current Object 

if (!cell currObj)
{infoBox 
"Select a table cell"; halt
} Object tabObj = getTable currObj print 
"Table\t\t\t" (identifier(tabObj )) 
"\t l-" (level(tabObj )) 
"\t" (number(tabObj )) 
"\n"   Object rowObj, cellObj Link l 

for l in tabObj <- 
"*" 

do 
{ 

if (confirm(
"Delete link to table object?"))
{delete l
} 
} 

for rowObj in tabObj 

do 
{ 
// obj -> rowObj  This gave an error, so I commented it out, and rowObj seems to be set up ok without it. print 
"\tRow\t\t" (identifier(rowObj)) 
"\t l-" (level(rowObj)) 
"\t" (number(rowObj)) 
"\n" 

for l in rowObj <- 
"*" 

do 
{ print 
"link found on row object" 

if (confirm(
"Delete link to row object?"))
{delete l
} 
} 

for cellObj in rowObj 

do 
{ 
// This is just to illustrate how you  
// would loop through the cells in one row 
} 
}


And here is the output;

Table SMS_PFS_638 l-5 2.2.1.3.0-1
Row SMS_PFS_639 l-6 2.2.1.3.0-1.0-1
Row SMS_PFS_642 l-6 2.2.1.3.0-1.0-2
Row SMS_PFS_645 l-6 2.2.1.3.0-1.0-3
Row SMS_PFS_648 l-6 2.2.1.3.0-1.0-4
Row SMS_PFS_651 l-6 2.2.1.3.0-1.0-5
Row SMS_PFS_654 l-6 2.2.1.3.0-1.0-6

Oh, seems like no incomming links on object 651. Great, I'll delete it...

"cannot delete - object(s) have 1 incomming link (via A-B to object 651 from A:a1)"

So perhaps the dxl is not quite right?

Apologies for the bad mistake in my code. The line

// obj -> rowObj

was in to create links from an earlier defined object (obj) to each row object. That was of course only necessary to create my test case and would have completely spoiled your task. Glad it gave an error message ...

Anyway, the rest looks o.k to me.

Was Module A open when you ran the script?

Does Object a1 exist in Module A?

Does Object a1 in Module A show a link arrow?

If so, where does it point to?
Peter

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
SystemAdmin - Thu Jun 04 05:51:24 EDT 2009

Peter_Albert - Thu Jun 04 05:36:58 EDT 2009
Apologies for the bad mistake in my code. The line

// obj -> rowObj

was in to create links from an earlier defined object (obj) to each row object. That was of course only necessary to create my test case and would have completely spoiled your task. Glad it gave an error message ...

Anyway, the rest looks o.k to me.

Was Module A open when you ran the script?

Does Object a1 exist in Module A?

Does Object a1 in Module A show a link arrow?

If so, where does it point to?
Peter

OK,

a1=654 btw, which does not seem to exist in module a. (tried view deletions, going to earlier baseline).
Module A was not open las time. I now open module A, and run it again.

look at this...

Table SMS_PFS_638 l-5 2.2.1.3.0-1
Row SMS_PFS_639 l-6 2.2.1.3.0-1.0-1
link found on row object
Row SMS_PFS_642 l-6 2.2.1.3.0-1.0-2
link found on row object
Row SMS_PFS_645 l-6 2.2.1.3.0-1.0-3
link found on row object
Row SMS_PFS_648 l-6 2.2.1.3.0-1.0-4
link found on row object
Row SMS_PFS_651 l-6 2.2.1.3.0-1.0-5
link found on row object
Row SMS_PFS_654 l-6 2.2.1.3.0-1.0-6
link found on row object
OK, great we found lots of links (and one on the table object too, btw). I next tried answering yes to confirm deletion on row 651.

I deleted the row, purged the module. And behold the row disappears! You've done it - great and THANK YOU SO MUCH.

Have you got any thoughts on why we might be creating these links to table/row objects I would like to put a stop to the practice if possible??

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
SystemAdmin - Thu Jun 04 06:02:01 EDT 2009

SystemAdmin - Thu Jun 04 05:51:24 EDT 2009
OK,

a1=654 btw, which does not seem to exist in module a. (tried view deletions, going to earlier baseline).
Module A was not open las time. I now open module A, and run it again.

look at this...

Table SMS_PFS_638 l-5 2.2.1.3.0-1
Row SMS_PFS_639 l-6 2.2.1.3.0-1.0-1
link found on row object
Row SMS_PFS_642 l-6 2.2.1.3.0-1.0-2
link found on row object
Row SMS_PFS_645 l-6 2.2.1.3.0-1.0-3
link found on row object
Row SMS_PFS_648 l-6 2.2.1.3.0-1.0-4
link found on row object
Row SMS_PFS_651 l-6 2.2.1.3.0-1.0-5
link found on row object
Row SMS_PFS_654 l-6 2.2.1.3.0-1.0-6
link found on row object
OK, great we found lots of links (and one on the table object too, btw). I next tried answering yes to confirm deletion on row 651.

I deleted the row, purged the module. And behold the row disappears! You've done it - great and THANK YOU SO MUCH.

Have you got any thoughts on why we might be creating these links to table/row objects I would like to put a stop to the practice if possible??

Script as archived for future use.



// This script searches all the hidden table and row objects for 
// incomming links. It then deletes them after checking with the user. 
// 
// To find them the module that is the source of the link must be open. 
//   Object currObj = current Object 

if (!cell currObj)
{infoBox 
"A table cell must be selected before running this script"; halt
} Object tabObj = getTable currObj Object rowObj, cellObj Link l 

for l in tabObj <- 
"*" 

do 
{ 

if (confirm(
"Delete link to table object " (identifier(tabObj)) 
"?"))
{delete l
} 
} 

for rowObj in tabObj 

do 
{ 

for l in rowObj <- 
"*" 

do 
{ 

if (confirm(
"Delete link to row object " (identifier(rowObj)) 
"?"))
{delete l
} 
} 
}

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
Peter_Albert - Thu Jun 04 06:11:03 EDT 2009

SystemAdmin - Thu Jun 04 05:51:24 EDT 2009
OK,

a1=654 btw, which does not seem to exist in module a. (tried view deletions, going to earlier baseline).
Module A was not open las time. I now open module A, and run it again.

look at this...

Table SMS_PFS_638 l-5 2.2.1.3.0-1
Row SMS_PFS_639 l-6 2.2.1.3.0-1.0-1
link found on row object
Row SMS_PFS_642 l-6 2.2.1.3.0-1.0-2
link found on row object
Row SMS_PFS_645 l-6 2.2.1.3.0-1.0-3
link found on row object
Row SMS_PFS_648 l-6 2.2.1.3.0-1.0-4
link found on row object
Row SMS_PFS_651 l-6 2.2.1.3.0-1.0-5
link found on row object
Row SMS_PFS_654 l-6 2.2.1.3.0-1.0-6
link found on row object
OK, great we found lots of links (and one on the table object too, btw). I next tried answering yes to confirm deletion on row 651.

I deleted the row, purged the module. And behold the row disappears! You've done it - great and THANK YOU SO MUCH.

Have you got any thoughts on why we might be creating these links to table/row objects I would like to put a stop to the practice if possible??

>> Have you got any thoughts on why we might be creating these links to table/row objects I would like to put a stop to the practice if possible??

AFAIK, Links to row object can't be created by the DOORS GUI, so they must have been created by a DXL script. Whether this was on purpose or accidentally is hard to say, but at least using links to row objects is highly unusual. So I'd guess it was an accident. If they continue to be created, you have to find the DXL script which creates the links.

Peter

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
SystemAdmin - Thu Jun 04 06:18:50 EDT 2009

Peter_Albert - Thu Jun 04 06:11:03 EDT 2009
>> Have you got any thoughts on why we might be creating these links to table/row objects I would like to put a stop to the practice if possible??

AFAIK, Links to row object can't be created by the DOORS GUI, so they must have been created by a DXL script. Whether this was on purpose or accidentally is hard to say, but at least using links to row objects is highly unusual. So I'd guess it was an accident. If they continue to be created, you have to find the DXL script which creates the links.

Peter

I bet they are being created by the "tools->compare modules" "Module Comparison Wizard" thing we have used, it creates links for all other object to object mappings, including, I fear, hidden table objects.

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
SystemAdmin - Thu Jun 04 06:19:59 EDT 2009

Conclusion: Look out for the "Module Comparison Wizard" creating links that can only be removed by dxl.

Re: Cannot Delete Table Row - incomming link on an INVISIBLE object in the row
Bob_Swan - Thu Jun 11 03:21:47 EDT 2009

SystemAdmin - Thu Jun 04 06:19:59 EDT 2009
Conclusion: Look out for the "Module Comparison Wizard" creating links that can only be removed by dxl.

As an alternativethought, if you are told the link source delete it from there. Then go delete the table entry.
Of course if the links are from a hidden table entry then you have to use the script suggested.