Hi.
Our aim is to have a list table showing only records that match one value typed inside text input control.
I have create a new parameter with default value like this "select state". Applied that parameter to text input control. And also applied filter to list table that takes into consideration the value of parameter. Because "select state" value is not present in list table, nothing is displayed. Good so far. After user enters correct state values and presses Enter, list table again shows everything correctly. Now, the problem happens when user clears text input control and presses Enter, then parameter has lost it's default value and all the records are shown but in our case we shouldn't display all records but empty list table.
Any suggestions how to achieve this?
Rain
HI!
You can use boolean logic in your filter expression, i think I got it with this filter expression:
IF ( GetLength('parameter'p) > 0 )
RETURN ( UpCase('searchvar'n) StartsWith UpCase('parameter'p) )
ELSE ( 'searchvar'n StartsWith '###' )
Does it work for you?
//Fredrik
HI!
You can use boolean logic in your filter expression, i think I got it with this filter expression:
IF ( GetLength('parameter'p) > 0 )
RETURN ( UpCase('searchvar'n) StartsWith UpCase('parameter'p) )
ELSE ( 'searchvar'n StartsWith '###' )
Does it work for you?
//Fredrik
Hi Fredrik.
I maybe missed the whole logic from you suggestion but I took this boolean logic and now my filter looks like this:
( GetLength('parameter'p) > 0 ) AND ( 'parameter'p = 'County1'n )
And this actually did the trick. After clearing text input box and pressing enter nothing is shown as we wanted.
Thank you.
Yours is much cleaner, nice!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.