creating a column containing a checkbox

Hi,

Does anyone know of a way to create a column in Doors which contains a checkbox?

I am building a requirements database with thousands of requirements and I want a quick way of selecting whether a requirement is relevant or not. The only way I can think of doing it at the moment is to create a column with an integer of 0 or 1 in it, but this takes a bit of time to select/modify, and my requirements document is big! so a way of selecting a requirement with just one click would be very helpful.

Many thanks,
JonLister - Fri Feb 04 04:05:01 EST 2011

Re: creating a column containing a checkbox
SystemAdmin - Fri Feb 04 07:22:47 EST 2011

For this kind of functionality DOORS uses enumerated attributes, classical example is attribute named "Requirement?" with possible values of "Yes" and "No" which you select from a drop down list. First you have to create an attribute type which contains your selections and based on that type your attribute. See in DOORS Help the section "Attribute types / creating" and "Attribute definitions / creating".

Note also that when you are editing you can set attribute values for multiple objects at the same time
when editing through Object Properties / Attributes - there is a section in DOORS Help also on this called "Editing using the object properties sheet". And BTW, of course your attribute definition can have a default value so that all of your objects can have "Requirement?" set as default to be "No".

Re: creating a column containing a checkbox
JonLister - Fri Feb 04 08:13:35 EST 2011

SystemAdmin - Fri Feb 04 07:22:47 EST 2011
For this kind of functionality DOORS uses enumerated attributes, classical example is attribute named "Requirement?" with possible values of "Yes" and "No" which you select from a drop down list. First you have to create an attribute type which contains your selections and based on that type your attribute. See in DOORS Help the section "Attribute types / creating" and "Attribute definitions / creating".

Note also that when you are editing you can set attribute values for multiple objects at the same time
when editing through Object Properties / Attributes - there is a section in DOORS Help also on this called "Editing using the object properties sheet". And BTW, of course your attribute definition can have a default value so that all of your objects can have "Requirement?" set as default to be "No".

Hi,

Thanks for the reply, however that's still not exactly what I want. Using the enumeration type and a yes/no selection still requires 3 clicks of a mouse for each requirement, as I said this is a bit tiresome as I have thousands of requirements. If there was some way of inserting a checkbox in the cell it would be much easier, as it requires only one click to activate. If this is not possible then fair enough, maybe I am expecting too much of doors.

And thanks for the tip on setting attributes for multiple objects, that will come in very useful.

Best regards,

Jon

Re: creating a column containing a checkbox
Peter_Albert - Fri Feb 04 08:29:53 EST 2011

JonLister - Fri Feb 04 08:13:35 EST 2011
Hi,

Thanks for the reply, however that's still not exactly what I want. Using the enumeration type and a yes/no selection still requires 3 clicks of a mouse for each requirement, as I said this is a bit tiresome as I have thousands of requirements. If there was some way of inserting a checkbox in the cell it would be much easier, as it requires only one click to activate. If this is not possible then fair enough, maybe I am expecting too much of doors.

And thanks for the tip on setting attributes for multiple objects, that will come in very useful.

Best regards,

Jon

I don't think a one-click-wonder is possible at all without DXL (well, the Module window is afaik realized in DXL, so I am sure Mathias can tweak the underlying code to make it possible, but anyway).

You need a double-click to activate the cell (the attribute of the current Object), and then another click to select a value.

I would suggest just writing a little on-demand DXL script with three buttons (yes, no, default). Clicking on a button would set the value for the current Object and go to the next object, so all you would havr to do is stare at the screen for hours, and clicking the buttons for your myriad of requirements.

Regards,

Peter

Re: creating a column containing a checkbox
Peter_Albert - Fri Feb 04 08:50:30 EST 2011

Peter_Albert - Fri Feb 04 08:29:53 EST 2011
I don't think a one-click-wonder is possible at all without DXL (well, the Module window is afaik realized in DXL, so I am sure Mathias can tweak the underlying code to make it possible, but anyway).

You need a double-click to activate the cell (the attribute of the current Object), and then another click to select a value.

I would suggest just writing a little on-demand DXL script with three buttons (yes, no, default). Clicking on a button would set the value for the current Object and go to the next object, so all you would havr to do is stare at the screen for hours, and clicking the buttons for your myriad of requirements.

Regards,

Peter

Something like this:


// Simple three-button dialogue box setting an attribute value 
/* Pressing a button sets an attribute value of the current Object and sets the current Object to the next object WARNING: No checks whatsoever whether the attribute exists, whether the values are possible values for this attribute, or whether the user has the correct access rights */ pragma runLim, 0 
// Adjust the variables below to your needs string attName          = 
"Put the correct attribute name in here" string optionOneValue   = 
"1" string optionTwoValue   = 
"2" string optionThreeValue = 
"" 
// ---------------------------------------- Module currMod = current Module 

if (

null currMod)
{halt
} 
// ---------------------------------------- DBE optionOneDBE DBE optionTwoDBE DBE optionThreeDBE 
// ---------------------------------------- 

void buttonCallBack(DBE dbe) 
{ 
// Set the attribute value and go to the next object Object currObj  = current Object Object nextObj  = 

null string newAttValue = 
"" 

if (

null currObj)
{

return
} 

if      (dbe == optionOneDBE)  
{newAttValue = optionOneValue
} 

else 

if (dbe == optionTwoDBE)  
{newAttValue = optionTwoValue
} 

else 

if (dbe == optionThreeDBE)
{newAttValue = optionThreeValue
} currObj.attName = newAttValue nextObj = next currObj 

if (!

null nextObj) 
{ 
// Go to the next object (current ObjectRef__) = nextObj refresh currMod 
} 
// Go to the next object 
} 
// Set the attribute value and go to the next object 
// ---------------------------------------- DB simpleSetAttributeDBE = create 
"This is a simple dialogue box without any error checking" optionOneDBE             = button(simpleSetAttributeDBE, 
"<">
"  , buttonCallBack) optionTwoDBE             = button(simpleSetAttributeDBE, 
"<">
" , buttonCallBack) optionThreeDBE           = button(simpleSetAttributeDBE, 
"<">
", buttonCallBack) realize simpleSetAttributeDBE show simpleSetAttributeDBE
#include it from the DXL editor of the current Module, and it should work.

Regards,

Peter

Re: creating a column containing a checkbox
JonLister - Mon Feb 07 05:34:14 EST 2011

Peter_Albert - Fri Feb 04 08:50:30 EST 2011
Something like this:



// Simple three-button dialogue box setting an attribute value 
/* Pressing a button sets an attribute value of the current Object and sets the current Object to the next object WARNING: No checks whatsoever whether the attribute exists, whether the values are possible values for this attribute, or whether the user has the correct access rights */ pragma runLim, 0 
// Adjust the variables below to your needs string attName          = 
"Put the correct attribute name in here" string optionOneValue   = 
"1" string optionTwoValue   = 
"2" string optionThreeValue = 
"" 
// ---------------------------------------- Module currMod = current Module 

if (

null currMod)
{halt
} 
// ---------------------------------------- DBE optionOneDBE DBE optionTwoDBE DBE optionThreeDBE 
// ---------------------------------------- 

void buttonCallBack(DBE dbe) 
{ 
// Set the attribute value and go to the next object Object currObj  = current Object Object nextObj  = 

null string newAttValue = 
"" 

if (

null currObj)
{

return
} 

if      (dbe == optionOneDBE)  
{newAttValue = optionOneValue
} 

else 

if (dbe == optionTwoDBE)  
{newAttValue = optionTwoValue
} 

else 

if (dbe == optionThreeDBE)
{newAttValue = optionThreeValue
} currObj.attName = newAttValue nextObj = next currObj 

if (!

null nextObj) 
{ 
// Go to the next object (current ObjectRef__) = nextObj refresh currMod 
} 
// Go to the next object 
} 
// Set the attribute value and go to the next object 
// ---------------------------------------- DB simpleSetAttributeDBE = create 
"This is a simple dialogue box without any error checking" optionOneDBE             = button(simpleSetAttributeDBE, 
"<">
"  , buttonCallBack) optionTwoDBE             = button(simpleSetAttributeDBE, 
"<">
" , buttonCallBack) optionThreeDBE           = button(simpleSetAttributeDBE, 
"<">
", buttonCallBack) realize simpleSetAttributeDBE show simpleSetAttributeDBE
#include it from the DXL editor of the current Module, and it should work.

Regards,

Peter

Yes! I got it working,

Many thanks for this Peter,

It's not quite what I wanted but it seems like the best compromise,

Now I'm going to be busy selecting requirements for the next few days!

regards, Jon