WRITE

Adds the key and value to a JSON object in the outbox. The path to the key will be created as needed.

Syntax

=WRITE(Key, Value, Type)

Arguments

Name

Description

Key

A key to a data item, that should be written. The key is usually created by using the OUTBOXDATA utility function. The key consists of the path to the item within the JSON object.

Value

Value to assign to key.

Type

Type of Value. Allowed types are String, Number, Boolean, Array, Dictionary. The type defines the color of the cell.

Return Value

The last part of the key of the data value to write.

Example

Function

Result

Comment

=WRITE(OUTBOXDATA(“Message”,”Customer”, “Name”), “Maier”, “String”)
Outbox Message:
WRITE
Example to write a value to a JSON object in the outbox.
=WRITE(OUTBOXDATA(“Message”,”Units”),READ(INBOXDATA(,,”Units”)))
Inbox Message:
ArrayIn
Outbox Message:
ArrayOut

You can also direct data from the Inbox into the Outbox. In this example the “Units” array from the Inbox is automatically transfered to the Outbox.

=WRITE(OUTBOXDATA(“Message”,”Output”,-1),JSON(J22:K24),)
inc
Pro tipp: If you want to automatically create an array, use -1 as the last OUTBOXDATA() parameter. This way the array will increment starting from 0.