If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How to code a Framework Manager filter

Started by halciber, 19 Mar 2019 04:18:06 PM

Previous topic - Next topic

halciber

Hi Everyone,

I'm new to FM, and I need to add a filter to a package I've made. At the advice of a colleague the filter was coded by cutting and pasting from a similar filter in an older package. My filter is causing a error. I have a pretty good idea of where the problem is, but I don't know how to code these macros.

Can someone please tell me where I can find a guide on how to properly code the filter's definition?

Thanks,
Mike

bus_pass_man

What's the error?   Reading the error message might be a good place to start.  It might actually tell you what it thinks the problem is in an understandable message.

Some things to check would be the object references.  Make sure you have not left in references to things you don't want and that the object references are correct (no missing . or ] for example).

Other things to check would be the syntactic completeness of any functions used.

Filters are not too difficult to write, provided you understand what is being sought. 

Macro syntax can be tricky, especially if used in a different context from what is appropriate.

In general, a filter expression which uses macros will have syntax similar to this, where a session parameter is being feed to a parameter map:
[gosales].[Sales staff].[Staff name] = #$UserLookUpMap{$UserId}#


This is a simpler type of macro in a filter.

Product_lang = #sq($languageCode)#


Here's a link to a help topic on the question.

https://www.ibm.com/support/knowledgecenter/en/SSEP7J_11.1.0/com.ibm.swg.ba.cognos.ug_fm.doc/c_using_macro.html#using_macro


Contrary to some opinions in other threads, any syntactically correct expression, using any syntactically correct function, including in then else, is valid for a filter as long as the results of the filter resolve to a Boolean.   This is necessary as the filter is added to the WHERE clause of the SQL statement.