1 Reply Latest reply on Apr 26, 2014 9:46 AM by philmodjunk

    Case Function

    SkipGilleland

      Title

      Case Function

      Post

           I am trying to find out if a field contains "youtube" or "wistia" if they do I want to enter "video"...if not I want "NotVideo"

           This seems to work if it finds youtube, but if it finds wistia it is saying "NOTVideo.

            
           Case ( 
                     PatternCount(post_content;"youtube")>=1 ; "video"; 
                     PatternCount(post_content;"wistia")>=1;
                     "NOTVideo"
                    )

        • 1. Re: Case Function
          philmodjunk

               Your case statement is set up to do exactly that, return the thext "NOTVideo" if "wistia" is located anywhere in post_content. If you want that pattern to return "video", use this case function:

               Case ( 
                         PatternCount(post_content;"youtube")>=1 ; "video"; 
                         PatternCount(post_content;"wistia")>=1; "video" ;
                         "NOTVideo"
                        )
               You can simplify this to be:
                    Case ( 
                              PatternCount(post_content;"youtube") ; "video"; 
                              PatternCount(post_content;"wistia") ; "video" ;
                              "NOTVideo"
                             )