BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cuevasj
Quartz | Level 8

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é

1 ACCEPTED SOLUTION

Accepted Solutions
Madelyn_SAS
SAS Super FREQ

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

3 REPLIES 3
Madelyn_SAS
SAS Super FREQ

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.

 

cuevasj
Quartz | Level 8
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.
Rahul_SAS
Quartz | Level 8

Hi Madely_SAS,

 

I am able to build this logic thanks for sharing this information.

 

Adding to this, I am required one more facility on this i.e. when I type anything this should give me list of suggestion like drop down list so that the search would be more efficient as the user will start getting the relevent search in one go.

 

Otherwise, user has might get larger details and has to make another search with some more relavent keywords.

 

Thanks

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 3 replies
  • 5990 views
  • 2 likes
  • 3 in conversation