ABSTRACT (by Federico Levis ) Category: FM
FM Tip: use PromptInfo to change QS Filter, adding additional useful information
1. Problem
The Default QS Filter associated to the FM Model could have usability limit. In following example the Filter associated to City is unusable because the user needs also Country information to look for the proper Cities:
Example of City Filter not usable in QS, because it does not contain Country information
2. Goal
We want to display in the Filter "Country: City" instead of only City, but keeping only City in the Report Column, because there is already the separated Country Column, useful for Country Filter:
Our Goal: City Filter shows also Country, useful to help looking for the cities.
So the user can easily find the cities using also Country information; then the filter is applied to the City column using only the selected City information
3. Implementation Steps
In FM model create a QuerySubject containing
the field to Display in Filter: CountryCity
the field to be used as filter: e.g we can use City label (or CityId if present in DataTable)
Example [FILTER].[City] QuerySubject
Set the Prompt Info properties of City DataTable field ([Sakila Customer 2].[City]) to indicate to Cognos the Filter (Prompt) to display for City Column and how to apply the relative filter condition
In this case we use City as Use Item Reference because Data Table [Sakila Customer 2] contains only City and not CityId:
So Cognos will Display a Filter with:
Display Item Reference: Filter Visible Field = CountryCity
Use Item Reference: Filter Hidden Field = City
Then Cognos will use Use Item Reference (City) as filter Condition applying it to Filter Item Reference ([QS][Sakila Customer 2][City] DataTable Column)