Topic
  • 8 replies
  • Latest Post - ‏2012-09-27T08:15:41Z by SystemAdmin
SystemAdmin
SystemAdmin
1299 Posts

Pinned topic How to get current filter in DOORS?

‏2012-08-29T14:20:33Z |
Hi all,

I would like to export the string representation of filter used in DOORS module and print it in RPE generated document.

I would like to get the string as from following example DXL code:

Module m = current Filter f = current 

if (!

null(f) and !

null(m)) 
{ print stringOf(m, f) 
} 

else 
{ print 
"No filter or module!" 
}

Dis is basically the same string as in "Description..." window in Advanced filter properties.

Does anyone know how to get and display this current filter string from DOORS in RPE?

Regards,
Jarek
Updated on 2012-09-27T08:15:41Z at 2012-09-27T08:15:41Z by SystemAdmin
  • MikeS.
    MikeS.
    9 Posts

    Re: How to get current filter in DOORS?

    ‏2012-08-29T17:36:14Z  
    Great idea! This could be fairly useful for generating reports or "To DO" lists as you're getting ready for reviews.

    I would either add a DXL column to your view to display the text of the filter or add a DXL attribute to the module. I you add the DXL attribute to the module, it will work for any view, but you'll have to add it to your schema by doing a schema discovery.

    Just set up your template to read the value from one object and print it. For example, you can create a variable that's called "PrintFilter" and have it default to 0. Create a paragraph object with a condition that's set to PrintFilter = 0 and have the paragraph object set PrintFilter = 1 when it runs.

    DXL for adding column to view:

    Module m = current
    Filter f = current
    string s
    if (!null(f) and !null(m)) {
    s = stringOf(m, f)
    } else {
    s= "No filter or module!"
    }
    display s

    DXL for adding "ViewFilter" DXL attribute to module:

    Module m = current
    Filter f = current
    string s
    if (!null(f) and !null(m)) {
    s = stringOf(m, f)
    } else {
    s= "No filter or module!"
    }
    obj."ViewFilter"=s
  • SystemAdmin
    SystemAdmin
    1299 Posts

    Re: How to get current filter in DOORS?

    ‏2012-09-03T13:47:08Z  
    Hi,

    I know the solution with utilizing DXL attribute for that. But it has two drawbacks.
    1) You need to have that attribute defined in the module. Not feasible if you don't know the module beforehand making the export.
    2) If I want to have two exports in a row from two different views there is a chance the DXL will not be recalculated and keep the text value of previously applied filter.

    The thing is that there are different people making the exports from different modules with different filters. I would like to ensure that the filter string exported is current for the export.

    Regards,
    Jarek
  • cliff.sadler
    cliff.sadler
    32 Posts

    Re: How to get current filter in DOORS?

    ‏2012-09-12T15:54:54Z  
    RPE only knows about elements that are exposed in the schema. The value of a currently applied filter is not stored in an element that RPE could discover as far as I know. Sounds like a good RFE, though for exposing more about a view than just the columns being displayed.
  • SystemAdmin
    SystemAdmin
    1299 Posts

    Re: How to get current filter in DOORS?

    ‏2012-09-20T09:52:28Z  
    RPE only knows about elements that are exposed in the schema. The value of a currently applied filter is not stored in an element that RPE could discover as far as I know. Sounds like a good RFE, though for exposing more about a view than just the columns being displayed.
    How / Where can I create this RFE?
  • Dragos.Cojocari
    Dragos.Cojocari
    1622 Posts

    Re: How to get current filter in DOORS?

    ‏2012-09-20T10:28:43Z  
    Hey,

    you can submit RFE's though the IBM Software RFE Community

    Regards,
    Dragos

    RPE Actual
  • SystemAdmin
    SystemAdmin
    1299 Posts

    Re: How to get current filter in DOORS?

    ‏2012-09-24T11:00:53Z  
    Hey,

    you can submit RFE's though the IBM Software RFE Community

    Regards,
    Dragos

    RPE Actual
    RFE created:
    http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=26771

    Regards,
    Jarek
  • oymsj001
    oymsj001
    15 Posts

    Re: How to get current filter in DOORS?

    ‏2012-09-25T03:08:29Z  
    RFE created:
    http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=26771

    Regards,
    Jarek
    Hi Jarek,

    You can pass the string (from Mike's example) as an external attribute to RPE. Alternatively you can set an environment variable from the DXL script and then read it in RPE with the following assignment:

    
    java.lang.System.getenv(
    "FILTER_NAME");
    


    Regards,
    Sam
  • SystemAdmin
    SystemAdmin
    1299 Posts

    Re: How to get current filter in DOORS?

    ‏2012-09-27T08:15:41Z  
    • oymsj001
    • ‏2012-09-25T03:08:29Z
    Hi Jarek,

    You can pass the string (from Mike's example) as an external attribute to RPE. Alternatively you can set an environment variable from the DXL script and then read it in RPE with the following assignment:

    <pre class="jive-pre"> java.lang.System.getenv( "FILTER_NAME"); </pre>

    Regards,
    Sam
    Hi,

    I'm afraid, Mike's example depicts using DXL in attribute or column, and this does not guarantee recalculation of the DXL code on subsequent RPE exports. Is the "external attribute" you mentioned some different solution? Could you give more details about that?

    Regards,
    Jarek