VALUE1
contains
VALUE2

The contains operator returns true if the value on the left contains the value on the right, false if it doesn’t.


Parameters

This operator has two parameters:

value1 – The first numeric or text value.

value2 – The second numeric or text value.


Description

The contains operator compares two values (usually text) to see if the value on the left contains the value on the right anywhere within it.

"abcdef" contains "abc" ☞ true
"abcdef" contains "xyz" ☞ false
12345 contains 234 ☞ true

As the final example shows, the contains operator can work with numbers as well as text – it simply automatically converts the number into text before comparing.

As a more practical example, the formula below will be true if the Address field or variable contains the letters box.

Address contains "box"

This formula will be true if the address is P.O. Box 5328, and false if the address is 6938 Wilson Road.

Note: The contains operator does not worry about upper or lower case, so P.O. BOX 5328 or p.o. box 5328 will also produce true results. If upper and lower case are important to you, use the matchexact operator.

The contains operator will only tell you if the value on the right appears anywhere within the value on the left, but will not tell you the position of the text within the larger text. If you need to know the position use the search( function.


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but also now allows numeric as well as text parameters.