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!

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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
  • 268 views
  • 2 likes
  • 2 in conversation