Skip to content

Result Objects ​

Cloud Flow Blocks reference.

Blocks ​

Deferred Task Result ​

Block name: promiseresult

Provides the resolved value of a deferred task when used inside a promise completion callback.

Output ​

This block produces an output value of type Any.

Behavior ​

Returns the internal tvwaPromiseResult value when it is in scope. This value is introduced by the async callback generated by promisethen.

New Result Object ​

Block name: result_object

Creates a new result object with status, data, and err fields.

Inputs ​

InputTypeDescriptionAccepts
statusbooleanThe success status for the result object. This is typically provided by a logic_boolean block.logic_boolean
dataobjectThe result data value to store in the object.
errstringThe error message to store in the object. This is typically provided by a text block, but nullobject can also be used when there is no error.

Output ​

This block produces an output value of type Any.

Behavior ​

Generates a plain JavaScript result object with the fields status, data, and err. Missing inputs default to false, null, and an empty string respectively.

Result Data ​

Block name: result_data

Gets the data field from a result object.

Inputs ​

InputTypeDescriptionAccepts
resultobjectThe result object to read from. This is typically provided by a result_object block.

Output ​

This block produces an output value of type Any.

Behavior ​

Generates an expression that reads the data field from a result object and normalizes missing results to null.

Result Error ​

Block name: result_error

Gets the err field from a result object as text.

Inputs ​

InputTypeDescriptionAccepts
resultobjectThe result object to read from. This is typically provided by a result_object block.

Output ​

This block produces an output value of type String.

Behavior ​

Generates an expression that reads the err field from a result object and converts it to text, normalizing missing results to an empty string.

Result Status ​

Block name: result_status

Gets the status field from a result object.

Inputs ​

InputTypeDescriptionAccepts
resultobjectThe result object to read from. This is typically provided by a result_object block.

Output ​

This block produces an output value of type Boolean.

Behavior ​

Generates an expression that reads the status field from a result object and normalizes missing results to false.

Set Result Data ​

Block name: result_data_set

Sets the data field on a result object.

Inputs ​

InputTypeDescriptionAccepts
resultobjectThe result object to update. This is typically provided by a result_object block.
dataobjectThe new data value to store in the result object.

Output ​

This block does not produce an output value.

Behavior ​

Generates code that updates the data field on a result object when the object exists.

Set Result Error ​

Block name: result_error_set

Sets the err field on a result object.

Inputs ​

InputTypeDescriptionAccepts
resultobjectThe result object to update. This is typically provided by a result_object block.
errorstringThe new error message to store in the result object. This is typically provided by a text block.text

Output ​

This block does not produce an output value.

Behavior ​

Generates code that updates the err field on a result object when the object exists.

Set Result Status ​

Block name: result_status_set

Sets the status field on a result object.

Inputs ​

InputTypeDescriptionAccepts
resultobjectThe result object to update. This is typically provided by a result_object block.
statusbooleanThe new status value. This is typically provided by a logic_boolean block.logic_boolean

Output ​

This block does not produce an output value.

Behavior ​

Generates code that updates the status field on a result object when the object exists. The stored value is normalized so only an exact true input becomes true.