Query filters using JavaScript

You can query the effective settings of the global filter component by calling the method getFilter(filtername) of the global filter component. The method determines the selected filter value for the specified global filter and returns it as a string in the form filtername=wert (see chapter Transfer of filter values). The filtername element corresponds to the name attribute of a filter XML element in the dashboard configuration file (extension _conf.xml). If you transfer an empty string for filtername, an &-separated list of all preselected filters is returned.

Example

For the demo database, you are using a Management view page in which you initialized the global filter in the mvFilter object (see chapter Integrate global filter components). If you set the value 3000 (Oak Springs) in this filter for the dimension Plant and a time filter for the year 2008, calling the method mvFilter.getFilter(""); returns the value TIME(MM/yyyy):-=1/2008-12/2008&WERKS(VAL (DESC))=3000 (Oak Springs).

If you call the method with the dimension name Plant, calling the method mvFilter.getFilter("WERKS"); returns the value WERKS(VAL (DESC))=3000 (Oak Springs).