Global::queryRange Method [AX 2012]
Returns a string that represents a range filter that can be used as value for QueryBuildRange.
Syntax
client server public static str queryRange(
anytype _From,
anytype _To,
[boolean treatOnlyNullAsUnbound])
Run On
Called
Parameters
- _From
Type: anytype
The lower bound of the range; optional.
- _To
Type: anytype
The upper bound of the range; optional.
- treatOnlyNullAsUnbound
Type: boolean
A Boolean value that specifies whether to treat empty values as unbound; optional.
Return Value
Type: str
A string representing a range filter that can be used as a value for the QueryBuildRange method.
Remarks
This method generally returns the string in the format of '_from..._to'. If _from is null or empty value and treatOnlyNullAsUnbound is set to false, the value is dropped from the string and it becomes '..._to'. _from in this case represents an unbound value. This also applies for _to.
When both _from and _to are unbound values, the function returns an empty string and the range filter will be dropped from the query when it is used as value for the QueryBuildRange method.