IBM Support

Sample Rational DOORS DXL script for adding additional Filter condition to an existing View in a Formal Module

Question & Answer


Question

How do you use a DXL script to add additional filter conditions to an existing View in a IBM Rational DOORS Formal Module?

Answer

There may arise a need to have additional Filter conditions added onto an existing View in an IBM Rational DOORS Formal Module which has Filter conditions already defined in it.

You can achieve this by using an Advanced Filter (Detailed information on how you can use Advanced Filters is explained in the DOORS Help section: "Finding, filtering and sorting --> Using an advanced filter")

You can also use a DXL script to add additional Filter conditions using the following sample DXL script.


Disclaimer

All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.



=====================================================================
string vname="Test_Execution_Status" // User must enter name of the View
Filter f,f1,f2
View v=view ("Test_Execution_Status")
load v
f=current
f1=attribute "Result" == "Pass"

f2=f && f1
int x,y

addFilter (current Module,f2,x,y)
print "Accepted - " x"" "\n"
print "Rejected - " y"" "\n"
save v
=====================================================================


In this sample script "Test_Execution_Status" is the name of an existing View in DOORS which has a Filter already defined in it. A new Filter condition is specified for Objects whose attribute value is set to 'Pass' for an Attribute named "Result". A "AND" operation is then performed between the existing Filter and the new filter we defined in the script. Lastly the latest Filter condition is saved back to the View.

The sample script provided is just an example. You can modify or enhance the sample script to suit your requirements.

[{"Product":{"code":"SSKR2T","label":"IBM Engineering Requirements Management DOORS"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.2;8.3;9.0;9.1;9.1.0.2;9.2;9.2.0.1;9.2.0.2;9.2.0.3","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
01 May 2020

UID

swg21432301