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

i have created a text input on SAS VA report where user can search last name. i have assigned category last name to the input box so as the user types last name it shows the last name starts with that word. 

 

client don't want this they want to be able to search last name that contains this specific word and filters the results. (like wildcard search)

 

e.g 

when searching in “Last_Name”  if I search “Hutterian” I only get the records where “hutterian” is the first word in the cell – not records like “Clear Lake Hutterian” or “Three Hills Hutterian”

 

please help!

1 ACCEPTED SOLUTION

Accepted Solutions
anamika009
Fluorite | Level 6

Hi Ashish!!!!

You are great thank you sooooo much for this and yes it solved the issue and i am getting the results i want!!

God Bless!!!! 🙂lastnamesearch6.jpg

 

View solution in original post

13 REPLIES 13
Madelyn_SAS
SAS Super FREQ

You can achieve this by: 

1.Create a parameter based on the Category you are using in the Text Input control. 
2.Assign the parameter to the Text Input control in Parameter role.
3.On the target object, create a filter similar to this, where "Name" is the category you are filtering on:  ( UpCase('Name'n) Contains UpCase('Name Parameter'p) )






anamika009
Fluorite | Level 6

Hi Madelyn!

 

Thank you so much for your quick response!

 

I have followed the instructions and created the parameter and assigned it as a role to last name input box. I have also created the filter but its not working for me. Do i also assign the category under roles?

 

Please see attached file.

Madelyn_SAS
SAS Super FREQ

Yes, the data item should be in the Category role and its parameter should be in the Parameter role. 

anamika009
Fluorite | Level 6

Hi Madelyn,

 

Thank you again!

 

data item (last_name) is in the category role and parameter in parameter role but its still not working. Please help!

Madelyn_SAS
SAS Super FREQ

I was actually incorrect. The Text Input control should have only the parameter assigned to the Parameter role. Here is an example: 

Report has a Text Input control with Origin Parameter assigned to the Parameter role.
List table has these data items: Origin, Make, Invoice. Some valid values for Origin are Asia, Europe, USA.
List table has an Advanced Filter (Filters pane) with this expression: 

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

I enter a lowercase letter a in the Text Input control and press ENTER. This is important because the value is not registered until you press ENTER. 

The list table is filtered to show USA and Asia.

ASHISH2525
Quartz | Level 8

Hi Anamika,

 

This is may be you were looking for.

 

Regards,

Ashish

 

 

( UpCase('Task name'n) Contains UpCase('Task name Parameter'p) )

Filter.PNG

 

Data.PNG

 

Output.PNG

anamika009
Fluorite | Level 6

Thank you so much Ashish!!

I have the similar code but its just not working for me. I have SAS VA 8.2. 

Also if i don't have the category assigned for Last_Name i see an error sign on the input box. 

Please see screenshots.

Please help!!!

lastnamesearch1.jpg

 

lastnamesearch2.jpg

 

lastnamesearch3.jpg

 

ASHISH2525
Quartz | Level 8
Anamika !

Please share the screenshot how you created this parameter ?
Did you apply the filter on list table it self ?


Regards,
Ashish
anamika009
Fluorite | Level 6

Hi Ashish!

 

Thank you once again for your quick response!

I have created the parameter by going into LAST_NAME category and adding a parameter from there.

I have applied the filter on the LAST_NAME T'ext_Input' box not the list table.

Please see the screenshots.

 

 

lastnamesearch4.jpg

 

lastnamesearch5.jpg

 

 

Madelyn_SAS
SAS Super FREQ

The filter needs to be on the list table. 

ASHISH2525
Quartz | Level 8

You have to apply the filter on list table only.

anamika009
Fluorite | Level 6

Hi Ashish!!!!

You are great thank you sooooo much for this and yes it solved the issue and i am getting the results i want!!

God Bless!!!! 🙂lastnamesearch6.jpg

 

ASHISH2525
Quartz | Level 8

Cheers !!

 

Good to hear that.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 13 replies
  • 3134 views
  • 11 likes
  • 3 in conversation