getItems


Purpose

Gets a list of items selected by specifying their type and handle.

Data types are freely defined data item categories, presented as string values. Handles are data item identifiers. Together they are used to identify individual data items.

This method can be called no earlier than after the getOfflineStorageCount method's onSuccess callback is invoked during the first application start. Otherwise, it fails with onFailure callback invoked.

Signature

getItems( type, handle, onSuccess, onFailure )

Returns

This method does not return anything.

Parameters

Name Description Type Use
type Type of data to be retrieved. string required
handle Data item identifier. Supports partial matches if full matches are not found. string required
onSuccess

A callback function, which passes an array of the result objects with item details, as described below.

function required
onFailure A callback function, called when illegal arguments are provided. It passes an error code, as defined in the Constants table in the Client Store article. function required

As its call parameter, the onSuccess callback receives an array of the result JSON objects, structured as follows:

{
  type,
  handle,
  content,
  syncstatus
}
Name Description Type
type The type of data in a retrieved data item. string
handle Data item identifier. string
content The retrieved item's data string. string
syncstatus Informs of the status of a sychronization operation. By default it passes "0", which denotes the "current" status. The other posssible value is: "1" for "modified". Items with status "2" (synching) are never included in the results. integer

Related topics

Client Store
Legal notice | Copyright © 2017 and Confidential to Pegasystems Inc. All rights reserved
PDN | Feedback
Advanced...