rbf_getCount2()

Warning: Support for using this method with external objects (such as those mapped to external tables, to OpenEdge Service objects, or through a HDP connection) is a beta feature. This method is supported in production systems, except for external objects.

Purpose

After applying the specified filter condition, retrieves the number of records in a view that meet that condition.

Syntax

rbf_getCount2(viewId, filterName, filterValue, callback, useLegacyDateFormat)

Parameters

viewId

The original ID of the view

filterName

Name of the filter added to existing filters.

filterValue

The value of the field to filter output using "equals".

callback

A function to process the specified operation and receive its result, in the XML format, as the first argument.

useLegacyDateFormat

This optional parameter only applies to JSON output and, specifically, to Date and Date/Time fields. If true, or if not specified, a date value is returned as a Date object. If false, a date value is returned as a String.

Note: This API is supported in portals as well.

Example

The following example prints the number of records whose city = Austin to the console.

function my_callback(count) {
  console.log("Count is: " + count);
      }
      
rbf_getCount2(7633, "city", "Austin", my_callback);