Toggle menu

getLabelValues()

Description

This function gets all the values that appear in a particular label field of histories that match the filter.

Parameters

NameTypeDescription
datasourceString, optionalThe name of the datasource from where histories will be retrieved. This parameter overrides the same parameter in the worker configuration which in turn overrides the default datasource
labelRequiredThe name of a history label field to get
filterFilter-object, optionalThe filter specifies which histories will be inspected. The syntax of filter objects relates to many methods and is explained in Filter Objects
sealedBoolean, optionalIf sealed is true, then only histories that have been switched into read-only mode will be searched. If sealed is false then only writable histories will be searched. If sealed is not supplied, then all histories will be searched
getsqlBoolean, optionalIf this parameter is supplied and set to true then the return structure will include an element called "sql" which contains the query and the parameters which were used to retrieve the history data from the database. This option returns a large amount of data and is intended for testing and debugging

Returns

If the getLabelValues() operation was successful then the result structure will contain an array of string/int/real/bool/null of the histories that match the filter.

Example

"method": "getLabelValues",
"params": {
    "label": "labelb",
    "filter": {
        "key": "labela",
        "EQ": "Licence"
    }
}


"result": ["2143-1062-9704-3982", "6266-3320-2008-8622", "6629-4303-7606-5679", "8050-2139-4595-2307", "8367-6650-5641-8809", "9934-5269-5144-3096"]

Last modified on 27 June 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon