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 RANGEBEGIN

Last modified: May 29, 2024

1 Description

The RANGEBEGIN function extracts the initial value of a range parameter.

The syntax is as follows:

RANGEBEGIN ( $range )

$range specifies the range parameter.

2 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:

1
2
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 RANGEBEGIN function in the where-clause, which will give you all the customers born since the beginning of last week:

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