<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Filter based on search words in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Filter-based-on-search-words/m-p/621303#M13474</link>
    <description>&lt;P&gt;Hi Matt,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as I can tell, concatenating spaces to a string does not work. I think this has to do with automatic cleanup of leading and trailing spaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could check each word using GetWord(), but that would be very tedious (you would be doing something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(((UpCase(GetWord('TXT_CASE_SBJCT_TITLE'n, 1) = UpCase('Search'p))&lt;/P&gt;
&lt;P&gt;OR&amp;nbsp;((UpCase(GetWord('TXT_CASE_SBJCT_TITLE'n, 2) = UpCase('Search'p))&lt;/P&gt;
&lt;P&gt;OR ((UpCase(GetWord('TXT_CASE_SBJCT_TITLE'n, 3) = UpCase('Search'p))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And so on up to the number of words you want to support (possibly a lot!)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I checked to see if you could use Substring() with FindString() to retrieve the characters before and after the match, but it looks like any space characters get cleaned up when you do this. (You can't do StartsWith(' ')).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Possibly someone else can offer another workaround, but I think it may not be possible for your "cat" search to return only "cat" and not "catcher" or "bobcat" unless you do a crazy expression based on GetWord().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sam&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jan 2020 20:19:04 GMT</pubDate>
    <dc:creator>Sam_SAS</dc:creator>
    <dc:date>2020-01-30T20:19:04Z</dc:date>
    <item>
      <title>Filter based on search words</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Filter-based-on-search-words/m-p/620518#M13456</link>
      <description>&lt;P&gt;I have thousands of rows of subject titles. I only want those contain, say "cat", in the titles. The text input has a search parameter embedded. The list table as the following advanced filter:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff0000"&gt;( UpCase('SBJCT_TITLE'n) Contains UpCase(Concatenate(&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff0000"&gt;Concatenate(' ', 'Search'p), ' ')) )&lt;/FONT&gt; &lt;STRONG&gt;OR&lt;/STRONG&gt; &lt;FONT color="#339966"&gt;( UpCase(Substring(&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;'SBJCT_TITLE'n, 1, GetLength('Search'p))) = UpCase(&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;'Search'p) )&lt;/FONT&gt; &lt;STRONG&gt;OR&lt;/STRONG&gt; &lt;FONT color="#3366ff"&gt;( UpCase('SBJCT_TITLE'n) EndsWith UpCase&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#3366ff"&gt;(Concatenate(' ', 'Search'p)) )&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;The red is for words in the middle, the green for words at the start of the title and the blue for words at the back. However, as you can see in the below picture, it is not what i expected exactly. Titles with "cat" do show up, but words like "catherine" and "catcher" also shows up. Also, the above formula is not perfect as well; what if the title has "cats", instead of "cat"? Any help is appreciated.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Mar 2021 13:45:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Filter-based-on-search-words/m-p/620518#M13456</guid>
      <dc:creator>mattneo</dc:creator>
      <dc:date>2021-03-27T13:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Filter based on search words</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Filter-based-on-search-words/m-p/621303#M13474</link>
      <description>&lt;P&gt;Hi Matt,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as I can tell, concatenating spaces to a string does not work. I think this has to do with automatic cleanup of leading and trailing spaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could check each word using GetWord(), but that would be very tedious (you would be doing something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(((UpCase(GetWord('TXT_CASE_SBJCT_TITLE'n, 1) = UpCase('Search'p))&lt;/P&gt;
&lt;P&gt;OR&amp;nbsp;((UpCase(GetWord('TXT_CASE_SBJCT_TITLE'n, 2) = UpCase('Search'p))&lt;/P&gt;
&lt;P&gt;OR ((UpCase(GetWord('TXT_CASE_SBJCT_TITLE'n, 3) = UpCase('Search'p))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And so on up to the number of words you want to support (possibly a lot!)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I checked to see if you could use Substring() with FindString() to retrieve the characters before and after the match, but it looks like any space characters get cleaned up when you do this. (You can't do StartsWith(' ')).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Possibly someone else can offer another workaround, but I think it may not be possible for your "cat" search to return only "cat" and not "catcher" or "bobcat" unless you do a crazy expression based on GetWord().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 20:19:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Filter-based-on-search-words/m-p/621303#M13474</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2020-01-30T20:19:04Z</dc:date>
    </item>
  </channel>
</rss>

