ArrayAddValue (Method)

Overview

Type:

Method

Available as of:

V1.5.4.0

Functional Description

This method used for adding a new value in the sub hierarchy level as the selected element. The value is added as the first in the array of elements.

The return value of type BOOL indicates TRUE if the execution has been processed successfully.

Interface

Input

Data type

Description

i_anyValue

ANY*

Specifies the value to be added.

(*) Supported data types are: BOOL, STRING, INT, UINT, DINT, UDINT, BYTE, WORD, DWORD, LWORD, REAL, LREAL, SINT, USINT, LINT, ULINT, TIME, LTIME, DATE_AND_TIME, DATE, and TOD.

NOTE: By executing this method, a previously detected error indicated by the corresponding properties is reset. The selected item must be of type TypeArray.
NOTE: By executing this method, the function block detects the type of input and converts it to appropriate ET_JsonValueType (refer to ET_JsonValueType).
NOTE: If required, special characters are implicitly added by the method. This can increase the string length.

Example

Calling the method adds the element marked in bold in the example:

Initial State

After Executing the Method

{
"SelectedArray" : ["ExistingValue"]
}
{
"SelectedArray" : ["NewValue", "ExistingValue"]
}