Skip to main content
All CollectionsBasics
Condition Operators
Condition Operators
Justin Yan avatar
Written by Justin Yan
Updated over 3 months ago

Operators are ways of comparing data, used primarily in Filters, both hidden and visible.

Have a look at these related articles πŸ”Ž:


​Click here to learn more about Visible Filters

Click here to learn more about Hidden Filters

This article goes into detail about the use of the 'Operators' field in Frontly and the different options available:

Equals

Compare 2 values to ensure they are identical

Does Not Equal

Compare 2 values to ensure they are not the same

Greater Than

Ensure a value is greater than another value, numerically

Less Than

Ensure a value is less than another value, numerically


Contains

Ensure that a value contains another value

Examples: A filter for "John Smith" contains "John" would be true because the entire "John" value exists within "John Smith".

A filter for "John Smith" contains "John Doe" would be false, because the entire "John Doe" value does not exist within "John Smith".


Does Not Contain

Ensure that a value does not contain another value. Same as the 'Contains' example above, but opposite.

Length Greater Than

Ensure a value's text length is greater than a certain number of characters

Length Less Than

Ensure a value's text length is less than a certain number of characters

Date After

For comparing 2 dates to ensure one is after the other

Date Before

For comparing 2 dates to ensure one is before the other

Exists

Ensure a value is valid or not empty

Does Not Exist

Ensure that a value is completely empty or not set


Advanced Operators

The following operators offer a more advanced and nuanced way of setting up your conditions around Frontly. These utilize terms that are familiar to developers so it's best to define what they mean first.

String: A sequence of characters (letters, numbers, symbols) treated as a single data type. For example, "hello" or "123abc" are strings.

Array: A collection of elements, typically of the same data type, stored in a specific order. Each element in an array can be accessed by its index (position). For example, ["apple", "banana", "cherry"] is an array of strings.

With these terms in mind, here are the advanced options:

String Equals String

Checks if two strings are exactly the same


​Array Contains String
Checks if a string is an element within an array
​

String Contains String
Checks if one string is a substring of another string
​

String In Array
Same as "Array Contains String"; checks if a string is found within an array
​

String in String
Same as "String Contains String"; checks if one string is inside another string
​

String Not In String
Checks if one string is not a substring of another string
​

String Not In Array
Checks if a string is not an element within an array
​

Array Does Not Contain String
Same as "String Not In Array"; checks if a string is not present in an array
​

String Does Not Contain String
Same as "String Not In String"; checks if one string does not contain another string.

Did this answer your question?