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.
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!
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!
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!
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.