SI.QUERYFILTER Function
Created by Harry Lewis, Modified on Wed, 18 Dec at 3:12 PM by Harry Lewis
Applies to:
- Velixo NX
- Sage Intacct
The SI.QUERYFILTER function returns a STRING that can be used as input for the FILTER argument in the SI.QUERY function.
TABLE OF CONTENTS
Syntax
SI.QUERYFILTER(Connection, Object, Column, Criteria, Column, Criteria, ..., Column, Criteria)
Parameters
The SI.QUERYFILTER function uses the following parameters:
Parameter | Required/Optional | Description |
Connection | Required | The name of the connection as configured in the Connection Manager |
Object | Required | The name of the Sage Intacct object to filter |
Column1 | Required | The name of the first column to which criteria is to be applied |
Criteria1 | Required | This can be:
Each value should contain an Excel comparison operator (<>, >, <, =, >=, <=) followed by a criteria value for the column, for example, ">=42". If the operator is not explicitly specified, the equality operator "=" is assumed. In case this parameter is an array or a range of cells, each of those will be considered an alternative, and will be joined via a logical "OR" |
Column2 | Optional | The name of the first column to which criteria is to be applied |
Criteria2 | Optional | A single value, an array of values, or a range of cells containing the criteria for the second column. |
... | ||
ColumnN | Optional | The name of the Nth column to which criteria is to be applied |
CriteriaN | Optional | A single value, an array of values, or a range of cells containing the criteria for the Nth column. |
Examples
Null values
=SI.QUERYFILTER("Sage","Employee","Name","null")
Result (Name IS NULL) |
Not null values
=SI.QUERYFILTER("Sage","Employee","Name","not null")
Result (Name IS NOT NULL) |
Multiple Values
When we want the data from an object where a field can be set to one of multiple values, we can use a reference to a range of cells containing those values: or, if the values are returned by an array function, we can use array referencing: |
Wildcards
Sage supports two wildcard characters:
If a value contains one of these characters, eg. "Name", "M?k*", we get: (Name LIKE 'M_k%') We can also use "Name", "not like Mi*", to get: (Name NOT LIKE 'Mi%') |
All Values
When used by itself, an asterisk (*) is interpreted to mean the same thing as "is not null". For example: =SI.QUERYFILTER(A1,"Location","LocationID","*") Using the asterisk and question mark (*?) can be used to match and any and all values. For example: =SI.QUERYFILTER(A1,"Location","LocationID","*?") In practice, this results in a non-filter (since nothing is really being filtered). e.g., (note that STATUS is not included in the resulting filter) |
Empty values
Excel treats empty cells as the value 0. As such:
In order to obtain a truly empty value, an apostrophe (') should be used in the criteria cell. Thus:
Similarly, when working with date columns, specifying an empty cell will result in: (BIRTHDATE = '12/30/1899') Which equates to 0 in the Excel date system. |
Specific Data Types
PercentagesPercentages must be passed as a decimal value between 0 and 1. An Excel cell formatted as % should return values like this. CurrencyCurrency values should be passed as a number only, without any monetary symbols Date and TimestampSupport is provided for the following formats:
For example: =SI.QUERYFILTER(A1,"GLENTRY","WHENCREATED","> 2020-04-27 23:19:10") |
Boolean values
Boolean (true/false) values can be specified as:
=SI.QUERYFILTER($E$4,"Employee","POSTACTUALCOST",TRUE)
=SI.QUERYFILTER($E$4,"Employee","POSTACTUALCOST","true")
=SI.QUERYFILTER($E$4,"Employee","POSTACTUALCOST",1)
All the examples above should result in the same filter: (POSTACTUALCOST = true) Due to Excel treating empty cells as the value zero, specifying an empty cell will result in: (POSTACTUALCOST = false)
|
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article