BookmarkSubscribeRSS Feed
andypandy_swe
Obsidian | Level 7

I have a dropdown list of country names. The selected country is placed in a parameter for use elsewhere.
However I would like the parameter to hold countryID instead of countryName, but still display the country name in the dropdown list. 

I tried a a character format on countryID ('46' = 'Sweden') and set the dropdownlist to use countryID but the parameter then contains the formatted value so that didn't work.

Is there a way to do this?

2 REPLIES 2
andypandy_swe
Obsidian | Level 7

I found that I could have the dropdown list displaying countryName and then add another dropdownList with countryID that is filtered by the first one (countryName and CountryID are in the same table).
The second one then sets a parameter containing the ID instead of the name.
I guess I'll try and hide the countryID -list somewhere...

It works reasonably well but I'd be interested in a better solution if anyone has one.

BrunoMueller
SAS Super FREQ

Which version of VA are you using. For numeric values you might be able to use a parameter that is filled with an expression. This expression can have a filter which can use a parameter.

So if you have 2024.05 or newer I would give it a try.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1062 views
  • 0 likes
  • 2 in conversation