Q:

DXL script to save all advanced filters

I have found a script which lets the user write advanced filters; this script can load the current filter from each view but not all filters which exist in the Filtering dialog box.  I'd like to be able to extract all of the current advanced filters, even if only as character strings (since I have the tools to parse those strings back into a  Filter class object).  If someone knows of a DXL function to retrieve that information, or where the filter strings are stored, I'd appreciate the info. 
Note: no luck chasing this down in the Rational forums. 

A:

Here's my hack method.   Basically, there's a few setup and operational lines, anda bunch of filter definitions and combinatorics in the middle.   This does save the defined filter as part of the current View.
// copypaste next block into DXL edit window
string viewName = "My_View"
filtering off
// individual items first
Filter head = attribute "_ObjectType" == "Heading"
Filter req = attribute "_ObjectType" == "requirement"
Filter inrev = attribute  "_ReqStatus" == "In Review"
Filter ApprListBob = includes(attribute "_ApprovalList","BobJones")
Filter ApprListMary = includes(attribute "_ApprovalList","MaryContrary")
// now combine as desired. examples shown
// Filter ftwo =  ((head && !freq) || inrev)

Filter foofilt = (head ) || (req  && inrev) //) && ApprListBob
set foofilt
filtering on 
// now write  
addFilter(  foofilt)
set( foofilt)
refresh current       // module...
save view viewName //last arg is viewname
// end of copypaste block

For those new to DXL syntax,
&& for AND
|| for OR
!  for NOT
If an attribute can take only one value, use the attribute "atname" == "value"
form.  If it can take multiple values (e.g. checklist), use the includes(attribute "atname", "value") form.

