Placeholder

Customer Forum

Functions within IF functions

External Posted: 2011-08-09 10:56

 Hi,

Where can I find a full list of all functions I can use within IF functions? The only example on the Knowledge Base is x LIKE y, but hopefully there are more. Can I do things like x CONTAINS y?

Thanks

External Posted: Tue, 09.08.2011 - 11:38

 Thank you

Workbooks Support Posted: Tue, 09.08.2011 - 12:40

It sounds like you've already found the "Using Formulae" Knowledge Base page, which is the correct place to find a list of common formulae.

Workbooks uses the MySQL database management system, and therefore the database needs to be interrogated using the correct MySQL SQL statements and syntax.

In MySQL you achieve a 'CONTAINS' function with the LIKE statement.  For example, if you want to search for people that have a letter z in their name you'd use this:

name LIKE '%z%'

The z is enclosed in a pair of single quotes ( ' ) and percentage symbols ( % ).  The single quotes enclose the string that you're searching for.  The % is known as a wildcard character, which is used to represent any or no character.  In this case, you're searching for any name that contains a 'z' character, and can be preceded (first % symbol) or followed by (second % symbol) any or no characters.

This page of the MySQL reference guide explains Pattern Matching.

NOTE: Forum questions often discuss topics and examples that can be used to augment the usefulness of Knowledge Base articles.  We regularly transfer information from forum questions into the Knowledge Base.  Therefore, if you have a specific reporting requirement, please post a forum question.

You may also want to take a look at some of the questions we've already answered: