2 Replies Latest reply: May 15, 2014 9:57 AM by scwilly _ RSS

    Filter on specific word

    scwilly _

      Hi All-

       

      I am trying to create a filter for a column of information that would only return or display values in Table view that contained a certain word.

       

      Example:

       

      Catfish

      Bobcat

      Leopard

       

      I want to show only the rows or instances where "Cat" was part of a name. Can you do this in Monarch since the list could change and include Catepillar, Tomcat, etc.?

       

      Thanks

        • Filter on specific word
          Data Kruncher

          Hello and welcome to the forum scwilly.

           

          Yes, you absolutely can create this filter. To find all occurences of cat in the field named Animal, create a filter named Cat with the following expression:

           

          [font="courier"]Instr("cat",Animal)>0  /font[/quote]The Instr function looks for a specified string within another, in this case your Animal field. When it finds a match, it returns the position within the string where your search term begins. So when a match is found, the value is always greater than zero. No match? Return a zero.

           

          HTH,

          Data Kruncher

          • Filter on specific word
            scwilly _

            Wow this worked GREAT and solved all of my problems thank you so much for your help!!