Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

VA "contains" search in input text box

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 19
Accepted Solution

VA "contains" search in input text box

I am able to create a input text box, and using a paramater, it will allow for a dynamic search. This is good. To make it great, is there a way that as you start typing, the input text box does a "LIKE" or "CONTAINS" search so that any school with the letter appears in the drop-down. Right now, if I enter "J", then only schools that start with the letter J appear in the drop-down to select from (eg Jacksonvile Heights Elementary, or Jupiter Middle School). I would rather the drop-down include all schools that "contain" the letter "J" (eg San Jose Elementary, Jupiter Middle School).

 

Also, it appears that the filter function no longer works. If I seperate out the school_number and school_name, when I narrow down my school_number search and select a school_number, that school_name does not appear. Even worse, VA will allow you to enter a different school_name than what the school_number is assigned to, so you end up with no results becuase you have the number of one school and the name of another. I have attempted to filter school_name to school_number and school_number to school_name, and I even tried to change from filter to brush, but none worked.

 

If there is way to do a "contains" search, then the second part of my problem would be solved, as I can concatenate the school_numbber and school_name into one field, then as the user either enters a number or a name, the drop-down would narrow the results down accordingly.

 

Any suggestions?

 

José


Accepted Solutions
Solution
‎05-26-2017 03:13 PM
SAS Super FREQ
Posts: 436

Re: VA "contains" search in input text box

I was able to do a contains in this way:

  1. For the Text Input control, assign only the Parameter role. For example, assign School Parameter. Do not assign a Category.
  2. For the Drop-Down control, add the category that the parameter is based on. For example, School.
  3. For the Drop-Down control, create an Advanced filter with the following expression. This is the Text version:

                         ( UpCase('School'n) Contains UpCase('School Parameter'p) )

 

  1. Type some letters in the Text Input control and press ENTER. The entry isn't recorded until you press ENTER.
  2. Click the Drop-Down list. It should now be filtered based on CONTAINS.

 

View solution in original post


All Replies
Solution
‎05-26-2017 03:13 PM
SAS Super FREQ
Posts: 436

Re: VA "contains" search in input text box

I was able to do a contains in this way:

  1. For the Text Input control, assign only the Parameter role. For example, assign School Parameter. Do not assign a Category.
  2. For the Drop-Down control, add the category that the parameter is based on. For example, School.
  3. For the Drop-Down control, create an Advanced filter with the following expression. This is the Text version:

                         ( UpCase('School'n) Contains UpCase('School Parameter'p) )

 

  1. Type some letters in the Text Input control and press ENTER. The entry isn't recorded until you press ENTER.
  2. Click the Drop-Down list. It should now be filtered based on CONTAINS.

 

Occasional Contributor
Posts: 19

Re: VA "contains" search in input text box

I do like your solution. I don't want to take away from how you were able to come up with this, but I would be nice to be able to do it without having the initial selection then press enter requirement.
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 297 views
  • 1 like
  • 2 in conversation