WhereConstant Object

WhereConstant is a WhereParameter subclass with a value passed inline. It is used in expressions like fieldname = 15, where the 15 would be represented by a WhereConstant with the value property set to 15.

Where expressions are used to filter a request by applying extra conditions. They are generally stored as XML formatted strings, however, the scripting implementation can unwrap these into a tree. The WhereBuilder object can be used to create new instances of these objects.

The code snippet below shows how the WhereConstant Object can be used:

var LowerValue = WhereBuilder.createConstant(0,'Integer');
var UpperValue = WhereBuilder.createConstant(15,'Integer');
var BetweenCond = WhereBuilder.createBetween(WhereBuilder.createField('Orders','OrderID'),LowerValue,UpperValue)

Properties

value

Represents the value for this parameter. This can be of any supported type, like ints, floats and strings.

type

Represents the type of the parameter, valid types (Integer, String etc ) are listed on the WhereParameter page.