List Error Cluster Attributes.vi Returns Empty Array After Writing Attribute Using Write Error Cluster Attribute.vi

Updated Mar 6, 2026

Reported In

Software

  • LabVIEW

Issue Details

In LabVIEW, when using the Write Error Cluster Attribute.vi to add a custom attribute to an error cluster, calling the List Error Cluster Attributes.vi may return an empty array. This occurs even though the attribute was successfully passed to the Write Error Cluster Attribute.vi.

In the affected cases, the attribute appears not to be stored, and therefore it does not appear in the list of available attributes.

 

Solution

The Write Error Cluster Attribute.vi requires that the JSON value input contain a JSON-formatted string.

Even when writing simple strings, the JSON value must be wrapped between quotation marks, for example:

  • "my_value" -> valid JSON string.
  • my_value -> invalid JSON string; interpreted as undefined.

If the JSON input is not valid JSON, the attribute will not be stored, which results in List Error Cluster Attributes.vi returning an empty array.

Valid JSON examples required by the Error Cluster Attribute API:

Type

JSON format

Number

12.3

Boolean

true

String

"abcdefg"

Ensure that the JSON value input on Write Error Cluster Attribute.vi is formatted as valid JSON.

  • If writing a string attribute, add quotation marks
  • If writing numeric or Boolean attributes, ensure they match JSON formatting:
    • 123.4
    • true / false
  • Re-run List Error Cluster Attributes.vi — the attribute should now appear correctly.