Click to See Complete Forum and Search --> : Crystal X Keyword grabbing formula


dlovetere
March 13th, 2008, 10:20 AM
I have a report that is summarizing data from a survey we do. Some of the questions allow people to type in their suggestions. Now my bosses have asked me to find themes within those suggestions, so...

I tried to create an if-then statement.

If {FIELD} like ["keyword", "keyword", "keyword"] then "THEME" else ""

This doesn't work as the paragraphs do not begin with said keywords, so I am trying to figure out a way to say if this field CONTAINS this keyword somewhere in it, then it has this theme.

Is there any way to do this? Thanks.

dlovetere
March 13th, 2008, 12:02 PM
I figured it out. In case anyone was wondering the same thing, the formula I posted above is mostly correct, but one item is missing - widlcards.

If {FIELD} like ["*keyword*", "*keyword*", "*keyword*"] then "THEME" else ""

There must be asterisks at the beginning and end of every keyword, which act as wild cards. Doing this has allowed me to pull out the keywords I want.