Element Details: Compare+Filter
 Back


Available in: Logi Info Source code name: CompareFilterIntroduced in: v10.1.18

When used as a child of a DataLayer, CompareFilter removes rows that do not pass the comparison.

When used under a ConditionFilter element, multiple CompareFilters may be combined into more complex expressions that include ANDs and ORs and levels of parentheses.

CompareFilter performs better than the script-based ConditionFilter element.

CompareTypes:

=,<,>,<=,>=,!=
Basic comparison operations. String types evaluated with these methods are culture sensitive.

Between
The CompareValue must include two pipe ("|")separated numeric or date values. Rows with column values equal to or within the range remain.

Contains
Rows with DataColumns containing the CompareValue string value remain.

ContainsAll
Compares two comma delimited arrays, one in the DataColumn, the other in the CompareValue. To match, all values from both arrays must be the same, in any order.

ContainsAllInOrder
Compares two comma delimited arrays, one in the DataColumn, the other in the CompareValue. To match, all values from both arrays must be the same, and in the same order.

ContainsAny
Compares two comma delimited arrays, one in the DataColumn, the other in the CompareValue. To match, just one value from either array must be the same.

ContainsNone
Compares two comma delimited arrays, one in the DataColumn, the other in the CompareValue. To match, none of the values listed in the CompareValue attribute can be present in the column.

EndsWith
DataColumn values that end with the specified value remain.

FuzzyMatch
Performs a fuzzy match on string. DataColumns that "closely" match remain.

InYear, InMonth, InQuarter, InWeek and InDay match when the dates being compared are within the same time-span.

InList
DataColumn values that match an item in a comma-delimited list.

IsDateTime
Checks to see if the DataColumn contains a valid date time value.

IsDecimal
Checks to see if the DataColumn contains a valid decimal value.

IsEven
Checks to see if the DataColumn contains an even number.

IsInteger
Checks to see if the DataColumn contains a valid integer value.

IsNotDateTime
DataColumn values that do not contain valid date values remain.

IsNotDecimal
DataColumn values that do not contain decimal values remain.

IsNotInteger
DataColumn values that do not contain integer values remain.

IsOdd
Checks to see if the DataColumn contains a valid odd number.

LengthEquals
Checks to see if the length of the DataColumn value equals the CompareValue.

LengthGreaterThan
Checks to see if the length of the DataColumn value is greater than the CompareValue.

LengthGreaterThanOrEqualTo
Checks to see if the length of the DataColumn value is greater than or equal to the CompareValue.

LengthLessThan
Checks to see if the length of the DataColumn value less than the CompareValue.

LengthLessThanOrEqualTo
Checks to see if the length of the DataColumn value less than or equal to the CompareValue.

LengthNotEqualTo
Checks to see if the length of the DataColumn value is not equal to the CompareValue.

NotBetween
The CompareValue must include two pipe ("|")separated numeric or date values. Only rows with column values outside the range remain.

NotContains
Rows with column values that do not contain the CompareValue remain.

NotEndsWith
DataColumn values that do not end with the CompareValue remain.

NotFuzzyMatch
Performs a fuzzy match on string types. Performs a fuzzy match on string. DataColumns that do not "closely" match remain.

NotInList
DataColumn values that do not match any item of a comma-delimited list.

NotRegEx
DataColumn values that do match the regular expressionin the CompareValue remain.

NotStartsWith <



ATTRIBUTES

Click attribute Name to drill down for more information.

NamePossible ValuesDescription
CaseSensitive
True
False
Set CaseSensitive to "False" when comparing and matching values regardless of character case. For elements using DataLayer.ActiveSQL, CaseSensitive may be set to "DataSourceCollation". Then case sensitivity is defined by the database column's "collation" which may be sensitive or not. This option can provide better performance for case-insensitive filters. For AnalysisFilter with DataLayer.ActiveSQL and SqlCompareFilter, the default is "DataSourceCollation". The default is "True" for all other elements.
CompareType
StartsWith
RegEx
NotStartsWith
NotRegEx
NotInList
NotFuzzyMatch
NotEndsWith
NotContains
NotBetween
LengthNotEqualTo
LengthLessThanOrEqualTo
LengthLessThan
LengthGreaterThanOrEqualTo
LengthGreaterThan
LengthEquals
IsOdd
IsNotInteger
IsNotDecimal
IsNotDateTime
IsInteger
IsEven
IsDecimal
IsDateTime
InYear
InWeek
InQuarter
InMonth
InList
InDay
FuzzyMatch
EndsWith
ContainsNone
ContainsAny
ContainsAllInOrder
ContainsAll
Contains
Between
>=
>
=
<>
<=
<
(Required) Defines the type of comparison to perform.
CompareValue
UserDefined
The value to use in the comparison. When working with dates, to ensure they are not in an ambiguous format, specify values in y-m-d order.
DataColumn
UserDefined
(Required) The name of a data field/column returned from the DataLayer.
DataType
Text
Number
DateTime
Date
Boolean
Specifies the type of data present.
ID
UserDefined
(Required) The ID attribute is a pervasive attribute that uniquely identifies an element within a definition file. The ID needs to be a unique value within the definition.
IncludeCondition
True
False
An expression that evaluates to a value of True or False. If the expression is blank, or evaluates to true the element is processed. If the expression evaluates to false, the element is skipped. Expressions should be in VBScript or JavaScript syntax. For .NET versions, the scripting language can be set in the _settings.lgx General element. For Java versions, the scripting language is always JavaScript. Typically, you would compare values using an operator, such as "@Session.value~ < 0". Use quotes when working with strings: "@Session.myValue~" == "SomeValue"



PARENT ELEMENTS

Click element to drill down for more information.

Condition Filter
DataLayer.Bookmarks
DataLayer.Cached
DataLayer.CSV
DataLayer.Definition List
DataLayer.Directory
DataLayer.ETL
DataLayer.Excel
DataLayer.Fixed Format File
DataLayer.Google App
DataLayer.Google Spreadsheet
DataLayer.JSON
DataLayer.LDAP
DataLayer.Linked
DataLayer.Mongo Find
DataLayer.Mongo Map Reduce
DataLayer.Mongo Run Command
DataLayer.Plugin
DataLayer.REST
DataLayer.Scheduler
DataLayer.SimpleDB
DataLayer.SP
DataLayer.SQL
DataLayer.Static
DataLayer.Twitter
DataLayer.Web Feed
DataLayer.Web Scraper
DataLayer.Web Service
DataLayer.XML


CHILD ELEMENTS

Click element to drill down for more information.



 Back to top


 Chart Debug