BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
sbhemre
Calcite | Level 5

Hello,

I’m working on a map visualization in SAS Viya, and I want to ensure that the map doesn’t load any data until specific filter values are assigned by the user. Currently, the map starts loading data as soon as it is initialized, which is not the desired behavior.

My goal is to delay the map's data loading until the filter conditions are explicitly set. For example, the map should only display data after the user selects values in the filter controls.

1 ACCEPTED SOLUTION

Accepted Solutions
HunterT_SAS
SAS Employee

This may be a little tedious depending on how many prompts you have but one way to achieve this is to assign a Parameter to the "required" prompts.
Then you can assign a filter to the map and any other object you don't want to load yet using the "IsSet" function. The filter would something like this:

IF ( IsSet('Parameter'p))
RETURN (1=1)
ELSE (1=2)

which basically checks to see if there is a value for the parameter. If yes, then return values. If no, then return no values.

Hopefully that makes sense!

View solution in original post

1 REPLY 1
HunterT_SAS
SAS Employee

This may be a little tedious depending on how many prompts you have but one way to achieve this is to assign a Parameter to the "required" prompts.
Then you can assign a filter to the map and any other object you don't want to load yet using the "IsSet" function. The filter would something like this:

IF ( IsSet('Parameter'p))
RETURN (1=1)
ELSE (1=2)

which basically checks to see if there is a value for the parameter. If yes, then return values. If no, then return no values.

Hopefully that makes sense!

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
  • 1 reply
  • 731 views
  • 2 likes
  • 2 in conversation