If you would like to upgrade to a newer long-term support version of Studio Pro, see Moving from Mendix Studio Pro 8 to 9.

OQL RANGEEND

Last modified: August 27, 2024

Description

The RANGEEND function extracts the end value of a range parameter.

The syntax is as follows:

RANGEEND ( $range )

$range specifies the range parameter.

Example

RANGEBEGIN and RANGEEND are OQL functions that use a parameter, and OQL parameters are only available in datasets (which are used for generating a report). When you create a page and add a report that has a dataset, you can use RANGEBEGIN and RANGEEND in that dataset.

This is an example of using a range in OQL, where $range is set to last week, which will give you all the customers born in the last week:

select FirstName as First, LastName as Last, Name as Name, Birthday as BDay, CustomerType as Type from Sales.Customer
where Birthday IN ($rangeLastWeek)

This example uses the RANGEEND function in the where-clause, which will give you all the customers born since the end of last week:

select FirstName as First, LastName as Last, Name as Name, Birthday as BDay, CustomerType as Type from Sales.Customer
where Birthday > RANGEEND($rangeLastWeek)