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:
- Re-run List Error Cluster Attributes.vi — the attribute should now appear correctly.