Skip to main content

V1 - Query - Field Value Range Filter

sRange(field, from, to)

The sRange filter is used to search the content of a field, and match a range of values (inclusive). This filter works on fields with number values.

sRange("@fields.id","5","10")

In the above example, the search matches all records where the value of the '@fields.id' field is between 5 and 10, inclusive.

The following search will NOT match ('@fields.numstr' has a string value):

sRange("@fields.numstr","5","10")  // will not match data

nor will the following (start / end values must be quoted strings):

sRange("@fields.numstr",5,10) // will not compile

Note that the provided 'start' / 'stop' values must be quoted strings.

Example

The example below uses the demo-dataset from the introduction/tutorial page, dataset.

sRange("@fields.id","5","10")
let {id, isprime, odd, even} = f("@fields")

Note that the search filter does not return a presentable value. It is almost always following by the data extraction command 'let'.

Page last updated: 2022 Oct 02