nxa.GetItemIdsRegex (deprecated)

Description

This function returns a list of item IDs matching the provided criteria.

This function returns an array which starts with index 0. Since LUA arrays are normally starting with index 1, typical LUA array functions like looping through the array (“for index, itemId in pairs(itemIds) do”) and getting the size of the array (“table.getn(itemIds)”) will not work. Please use the function https://netxautomation.atlassian.net/wiki/spaces/PLATFORM/pages/1544552449 instead.

Signature

array nxa.GetItemIds (string, string, boolean, string)

Parameters

Name

Type

Mandatory/Optional

Description

Name

Type

Mandatory/Optional

Description

rootPath

string

M

The name of the root folder for the search.

itemIdRegex

string

M

A Regular expressions to filter full item IDs.

searchRecursive

boolean

O, default true

If true then data points in subfolders will be considered, otherwise only those of the given rootPath.

valueFilter

variant

O, default nil

If provided, only IDs of matching server items having the given value will be returned.

Example

nxa.GetItemIds("NETx\\XIO\\KNX\\Gateway1",".*00\/[0-3]\/[0-9]{3}$", true, true)

returns the list of all item IDs of the group addresses of KNX Gateway1, main group 00, middle group 0 to 3, where the current value is true.

Return

Type

Description

Type

Description

string []

An array of strings containing all item IDs matching the provided criteria. If no item IDs match, the function returns nil. The start index of the array is 0.

 

Applies to

  • NETx BMS Platform R2 Build 2060+

  • NETx Multi Protocol Server R2 Build 2060+