This content is now out of date.

Visit Our Community

Filtering on a custom query using different names


I wanted to know about creating a filter using a custom query, and in that custom query I add the descriptions such as below. Now when I did this the description shows up instead of the code in the filter(yay), but when i choose the filter nothing gets returned. I assume that means the filter is looking in DB for the description and not code.
So do i have to go back and create a description lookup table for the codes in the database and bring it into the view as my shortcut won't work?


WHEN [DELPHI047] = 0 THEN 'Unknown'
WHEN [DELPHI047] = 501 THEN 'Thin profile'
WHEN [DELPHI047] = 502 THEN 'Derogatory history'
WHEN [DELPHI047] = 503 THEN 'Clean activity'
WHEN [DELPHI047] = 504 THEN 'Clean and new to market'
END AS [Description]

Hi Thomas,

yes it does indeed sound like the description is being used for the look-up instead of the code, and you could confirm this by examining the report SQL code.

The way to accomplish what you are trying to do is by using Org Ref Codes.

If you have any questions are reading that wiki page and trying out an example using Org Ref Codes then please let us know and we'll be only too glad to try and further help out.