Can you set the display text of a filter to a string, but use an id as the actual filter?

Justin Pohlmann shared this question 2 years ago

For instance, if I have a table that looks like this:

location_key location_value

1 North America

2 South America

3 Australia

Can I set the pick list of my filter to display

North America

South America


But have it send 1, 2, and 3 as filters to the report?

Comments (1)


Hi Justin,

yes indeed you can. In Yellowfin this key/value mapping is done via Reference Codes.

Here is a wiki article to tell you more about this topic.

And I notice that in the article it doesn't actually have numbers mapping to names as an example, so I'll give you a quick example here:

I have created a set of Reference Codes called "Days of Week" as follows:


and that means that I can choose to map any integer column I have to show the mapped day names. So I edit the view and change the format of a column called Passengernum to Reference Codes and then select Days of Week:


then when I create a report based on that view and use that column as filter, then it will display the Day of Week but the report SQL will contain the original key, not the mapped value:


I hope that helps you with your reporting requirements, if there are any further questions please don't hesitate to ask.