top

ATTRIBUTERANGEFILTER

A filter which matches objects containing an attribute whose values are within a particular range.

Add the following line for AttributeRangeFilter class into a html file your own :

  script type="text/javascript" src="$MANAGER_WIDGET/Common/webapi/1.0/webapis.js">/script>

You can declare AttributeRangeFilter class like this :

  ex) var filter = new webapis.AttributeRangeFilter("parm1", "parm2", "parm3");


Constructor

AttributeRangeFilter

Description
A filter which matches objects containing an attribute whose values are within a particular range.
Parameters
attributeName DOMStringName of the object attribute used for filtering. This is the name of the object attribute exactly as it is defined in the object’s interface. For attributes of complex type, use fully-qualified names (e.g. ‘organizations.role’ to filter on a contact’s role in an organization). For attributes of array type, the filter will match if any value in the array matches.
initalValue ObjectObjects whose attribute is greater than or equal to initialValue will match. By default, this attribute is set to null.
endValue ObjectObjects whose attribute is strictly lower than to endValue will match. By default, this attribute is set to null.
Emulator Support
SDK Constraint
Example
// Define success callback
function successCallback(events) {
    console.log(events.length + " events today.");
}

// Define error callback
function errorCallback(error) {
    console.log("An error occurred: " + error.message);
}

// Create an attribute range filter based on event start date: "All events occurring today".
var now_dt = webapis.time.getCurrentDateTime();
var today_begin = new webapis.TZDate(now_dt.getFullYear(), now_dt.getMonth(), now_dt.getDate());
var today_end = today_begin.addDuration(new webapis.TimeDuration(1, "DAYS"));
var filter = new webapis.AttributeRangeFilter("startDate", today_begin, today_end);

// Send a search request to default event calendar.
webapis.calendar.getDefaultCalendar("EVENT").find(successCallback, errorCallback, filter);