Appearance
General
Cloud Flow Blocks reference.
Blocks
- Add to List Contents of List
- Add to or Subtract from Date
- Boolean ( value )
- Compare Dates
- Complete Deferred Task
- Create Deferred Task
- Current User
- Current User is in Group and Role
- Date
- Date from Text
- Date is in a Leap Year
- Date is in DST
- Days in Month for Date
- Difference Between Dates
- Exit Function
- Exit Function and Return
- Find Pattern in Text
- Flow Start
- Generate JSON
- Get Date Property
- is a Valid Number
- Log Category
- Move Date to Start or End Of
- Move Date to Weekday
- New Date from
- Number ( value )
- Object
- Object from JSON
- Replace Pattern in Text
- Set Date Property
- Test or Preview Mode
- Text Ends With
- Text from Date
- Text Matches Pattern
- Text Starts With
- Timer: After
- Timer: Repeat
- User Group
- User Role
- Wait for Multiple Deferred Tasks Completion
- Wait on Deferred Task Completion
- Wait on Deferred Task Completion
- Wait on Deferred Task to Complete and Then Do
- Write Log Message
Add to List Contents of List
Block name: merge_array
Creates a new list by concatenating the contents of one list with the contents of another list.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| list | array | The first list to include in the merged result. | |
| contents of list | array | The second list whose items should be appended to the first list. |
Output
This block produces an output value of type Array.
Behavior
Generates code that concatenates two lists using JavaScript array concat(...).
Related Blocks
lists_create_withlists_repeatlists_splitlists_sortmath_on_list
Add to or Subtract from Date
Block name: dateaddsub
Adds or subtracts a quantity of time from the selected date. This block updates the connected date value in place.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| operation | choice | Whether to add to or subtract from the date. | |
| date | date | The date value to update. This is typically provided by a date block, but dateclone can be used first if you want to preserve the original date. | date |
| quantity | number | The amount of time to add or subtract. This is typically provided by a math_number block. | math_number |
| units | choice | The time unit for the quantity. |
Output
This block does not produce an output value.
Behavior
Generates code that updates the selected ioLoop date object in place by adding or subtracting the given quantity of time. In JavaScript, ioLoop date values can be converted to and from Moment objects using $io.system.momentObjectFromIoLoopDate and $io.system.ioLoopDateFromMomentObject.
Calls: TvWaDate.add, TvWaDate.subtract
Related Blocks
Boolean ( value )
Block name: parse_boolean
Converts a value into a boolean using the ioLoop application's boolean parsing rules.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| value | object | The value to convert to a boolean. |
Output
This block produces an output value of type Boolean.
Behavior
Generates code that converts a value to boolean using the ioLoop application helper.
Calls: tvAppInstance.parseBoolean
Related Blocks
logic_booleanlogic_negatelogic_comparecontrols_if
Compare Dates
Block name: datecompare
Compares one date value with another date value.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| date | date | The date value to compare. This is typically provided by a date block, but other date-producing blocks such as datefromstring can also be used. | date |
| comparison | choice | The comparison to perform. | |
| reference date | date | The date value to compare against. This is typically provided by another date block. | date |
Output
This block produces an output value of type Boolean.
Behavior
Generates code that compares two ioLoop date objects using the selected comparison mode. In JavaScript, ioLoop date values can be converted to and from Moment objects using $io.system.momentObjectFromIoLoopDate and $io.system.ioLoopDateFromMomentObject.
Calls: TvWaDate.isBefore, TvWaDate.isSameOrBefore, TvWaDate.isAfter, TvWaDate.isSameOrAfter, TvWaDate.isSame
Related Blocks
Complete Deferred Task
Block name: promiseresolve
Completes the current deferred task with a result value.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| result | object | The value to return when the deferred task completes. |
Output
This block does not produce an output value.
Behavior
Generates code that calls the internal Promise resolver when it is available. This is intended to be used inside the statement area of a promisecreate block, where the resolver is in scope.
Related Blocks
Create Deferred Task
Block name: promisecreate
Creates a deferred task as a Promise and runs the nested statements inside that Promise.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| do | statements | The statements to run inside the deferred task. Use the promiseresolve block inside this area to complete the deferred task with a result. Nested blocks run inside the generated callback for this block. customcode and customcodeexpr blocks inside this area can directly access the documented callback-scope variables. |
Output
This block produces an output value of type Promise.
Behavior
Generates a JavaScript Promise and runs the nested statements inside its executor function. The nested blocks are emitted inside async function(tvwa_promise_resolve, tvwa_promise_reject) { ... }; the generated body also defines resolve as an alias for tvwa_promise_resolve and reject as an alias for tvwa_promise_reject, so customcode and customcodeexpr blocks inside the deferred task can access those in-scope variables directly.
Related Blocks
Current User
Block name: current_user_name
Gets the current user's name or identifier from the runtime context.
Output
This block produces an output value of type String.
Behavior
Generates code that reads the current user from the application runtime. When a webhook request context is available, that request context is passed through to the lookup.
Calls: tvAppInstance.getCurrentUser
Related Blocks
query_user_groupwait_for_logininfo
Current User is in Group and Role
Block name: query_user_group
Checks whether the current user belongs to the selected group at the selected role level.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| group | number | The user group to check. This is typically provided by a user_group_sel block. | user_group_sel |
| role | number | The role level to check within the selected group. This is typically provided by a user_role_sel block. | user_role_sel |
Output
This block produces an output value of type Boolean.
Behavior
Generates code that queries group membership for the current user through the application runtime. When a webhook request context is available, that request context is passed through to the lookup.
Calls: tvAppInstance.queryGroupMembership
Related Blocks
current_user_nameuser_group_seluser_role_selwait_for_logininfo
Date
Block name: date
Creates a new date value for either the current moment or the current day.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| type | choice | Whether to create a date for the current moment or the current day. |
Output
This block produces an output value of type TvWaDate.
Behavior
Generates a new ioLoop date object for either the current moment or the current day. In JavaScript, ioLoop date values can be converted to and from Moment objects using $io.system.momentObjectFromIoLoopDate and $io.system.ioLoopDateFromMomentObject.
Calls: tvAppInstance.dateNow, tvAppInstance.dateToday
Related Blocks
Date from Text
Block name: datefromstring
Creates a date value by parsing a text string using the provided format.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| text | string | The text to parse into a date. This is typically provided by a text block. | text |
| format | string | The format string used to parse the date text. |
Output
This block produces an output value of type TvWaDate.
Behavior
Generates a new ioLoop date object by parsing a text value with the provided format string. In JavaScript, ioLoop date values can be converted to and from Moment objects using $io.system.momentObjectFromIoLoopDate and $io.system.ioLoopDateFromMomentObject.
Calls: tvAppInstance.dateFromString
Related Blocks
Date is in a Leap Year
Block name: dateisleapyear
Checks whether the selected date falls within a leap year.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| date | date | The date value to inspect. This is typically provided by a date block. | date |
Output
This block produces an output value of type Boolean.
Behavior
Generates code that checks whether the selected ioLoop date object falls in a leap year. In JavaScript, ioLoop date values can be converted to and from Moment objects using $io.system.momentObjectFromIoLoopDate and $io.system.ioLoopDateFromMomentObject.
Calls: TvWaDate.isLeapYear
Related Blocks
Date is in DST
Block name: dateisdst
Checks whether the selected date falls within daylight saving time.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| date | date | The date value to inspect. This is typically provided by a date block. | date |
Output
This block produces an output value of type Boolean.
Behavior
Generates code that checks whether the selected ioLoop date object falls in daylight saving time. In JavaScript, ioLoop date values can be converted to and from Moment objects using $io.system.momentObjectFromIoLoopDate and $io.system.ioLoopDateFromMomentObject.
Calls: TvWaDate.isDST
Related Blocks
Days in Month for Date
Block name: datedaysinmonth
Gets the number of days in the month of the selected date value.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| date | date | The date value whose month should be inspected. This is typically provided by a date block. | date |
Output
This block produces an output value of type Number.
Behavior
Generates code that reads the number of days in the month of the selected ioLoop date object. In JavaScript, ioLoop date values can be converted to and from Moment objects using $io.system.momentObjectFromIoLoopDate and $io.system.ioLoopDateFromMomentObject.
Calls: TvWaDate.daysInMonth
Related Blocks
Difference Between Dates
Block name: datediff
Gets the difference between two date values in the selected time unit.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| units | choice | The time unit to use for the difference result. | |
| date | date | The first date value. This is typically provided by a date block. | date |
| reference date | date | The second date value to compare against. This is typically provided by another date block. | date |
Output
This block produces an output value of type Number.
Behavior
Generates code that calculates the difference between two ioLoop date objects in the selected time unit. In JavaScript, ioLoop date values can be converted to and from Moment objects using $io.system.momentObjectFromIoLoopDate and $io.system.ioLoopDateFromMomentObject.
Calls: TvWaDate.diff
Related Blocks
Exit Function
Block name: function_return
Exits the current function without returning a value.
Output
This block does not produce an output value.
Behavior
Generates a plain JavaScript return; statement. This is only meaningful inside a generated function body or another context where a return statement is valid.
Related Blocks
function_return_valueprocedures_defnoreturnprocedures_ifreturn
Exit Function and Return
Block name: function_return_value
Exits the current function and returns a value.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| return value | object | The value to return from the current function. |
Output
This block does not produce an output value.
Behavior
Generates a plain JavaScript return <value>; statement. This is only meaningful inside a generated function body or another context where a return statement is valid.
Related Blocks
function_returnprocedures_defreturnprocedures_ifreturn
Find Pattern in Text
Block name: regexp_match
Finds matches for a regular expression pattern within a text value.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| text | string | The text to search. | |
| pattern | string | The regular expression pattern to find. This is typically provided by a text block. | text |
| options | string | The regular expression flags such as i or ig. This is typically provided by a text block. | text |
Output
This block produces an output value of type Array.
Behavior
Generates a JavaScript match(new RegExp(...)) expression for the selected text value.
Related Blocks
regexp_testregexp_replacetext_indexOf
Flow Start
Block name: flow_start
Marks the recommended starting point for a Page Flow or Cloud Flow. This block is guidance for organizing a workspace; blocks do not have to be connected below it to run.
Output
This block does not produce an output value.
Behavior
Generates no runtime operation of its own. It is a label-only starter block with a bottom connector for optional organization.
Generate JSON
Block name: genjson
Converts an object or other value into a JSON text string.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| object | object | The value to convert into JSON text. This can be any block that returns an object or compatible value, such as define_object, emptyobject, formdataobject, data_record_object, httpdata, apicalldata, or tvexportobject. |
Output
This block produces an output value of type String.
Behavior
Generates code that converts a value into a JSON string through the ioLoop system runtime.
Calls: $io.system.generateJson
Related Blocks
Get Date Property
Block name: getdateprop
Gets a numeric property from a date value.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| property | choice | The date property to read. | |
| date | date | The date value to read from. This is typically provided by a date block, but other date-producing blocks such as datefromstring can also be used. | date |
Output
This block produces an output value of type Number.
Behavior
Generates code that reads a numeric property from the selected ioLoop date object. In JavaScript, ioLoop date values can be converted to and from Moment objects using $io.system.momentObjectFromIoLoopDate and $io.system.ioLoopDateFromMomentObject.
Calls: TvWaDate.year, TvWaDate.month, TvWaDate.dayOfMonth, TvWaDate.hours, TvWaDate.minutes, TvWaDate.seconds, TvWaDate.dayOfWeek
Related Blocks
is a Valid Number
Block name: checknan
Checks whether a value can be treated as a valid number.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| value | object | The value to test. |
Output
This block produces an output value of type Boolean.
Behavior
Generates a JavaScript isNaN check for the selected value and returns true when the value is a valid number.
Related Blocks
converttonumbermath_numbermath_number_propertyobjectisvalid
Log Category
Block name: log_cat
Provides a predefined logging category string for use with logging blocks.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| category | choice | The predefined logging category to use. |
Output
This block produces an output value of type String.
Behavior
Generates the selected predefined logging category string.
Related Blocks
Move Date to Start or End Of
Block name: datestartendof
Moves the selected date to the start or end of the chosen time unit. This block updates the connected date value in place.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| date | date | The date value to update. This is typically provided by a date block, but dateclone can be used first if you want to preserve the original date. | date |
| operation | choice | Whether to move the date to the start or end of the chosen unit. | |
| unit | choice | The time unit to align the date to. |
Output
This block does not produce an output value.
Behavior
Generates code that updates the selected ioLoop date object in place to the start or end of the chosen time unit. In JavaScript, ioLoop date values can be converted to and from Moment objects using $io.system.momentObjectFromIoLoopDate and $io.system.ioLoopDateFromMomentObject.
Calls: TvWaDate.startOf, TvWaDate.endOf
Related Blocks
Move Date to Weekday
Block name: dateweekday
Moves the selected date to the chosen weekday. This block updates the connected date value in place.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| date | date | The date value to update. This is typically provided by a date block, but dateclone can be used first if you want to preserve the original date. | date |
| weekday | choice | The weekday to move the date to. |
Output
This block does not produce an output value.
Behavior
Generates code that updates the selected ioLoop date object in place to the chosen weekday. In JavaScript, ioLoop date values can be converted to and from Moment objects using $io.system.momentObjectFromIoLoopDate and $io.system.ioLoopDateFromMomentObject.
Calls: TvWaDate.dayOfWeek
Related Blocks
New Date from
Block name: dateclone
Creates a copy of an existing date value.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| date | date | The date value to copy. This is typically provided by a date block, but other date-producing blocks such as datefromstring can also be used. | date |
Output
This block produces an output value of type TvWaDate.
Behavior
Generates a clone of the selected ioLoop date object. In JavaScript, ioLoop date values can be converted to and from Moment objects using $io.system.momentObjectFromIoLoopDate and $io.system.ioLoopDateFromMomentObject.
Calls: TvWaDate.clone
Related Blocks
Number ( value )
Block name: converttonumber
Converts a value to a number.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| value | object | The value to convert to a number. |
Output
This block produces an output value of type Number.
Behavior
Generates a JavaScript number conversion using Number(...) and falls back to null when no value is connected.
Related Blocks
math_numbermath_arithmeticchecknanconverttotext
Object
Block name: getvariablebyname
Gets a variable or object by name from the current script context.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| name | string | The variable or object name to read. |
Output
This block produces an output value of type Any.
Behavior
Generates an expression that reads a named variable from the current script scope and returns null when it is not defined.
Related Blocks
Object from JSON
Block name: jsonparse
Parses a JSON text string into an object, array, or other JSON value.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| JSON | string | The JSON text to parse. This is typically provided by a text block. | text |
Output
This block produces an output value of type Any.
Behavior
Generates code that parses a JSON string through the ioLoop system runtime.
Calls: $io.system.jsonParse
Related Blocks
Replace Pattern in Text
Block name: regexp_replace
Replaces text that matches a regular expression pattern and returns the updated text.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| text | string | The text to update. | |
| pattern | string | The regular expression pattern to replace. This is typically provided by a text block. | text |
| options | string | The regular expression flags such as i or ig. This is typically provided by a text block. | text |
| replacement text | string | The text to insert for each match. This is typically provided by a text block. | text |
Output
This block produces an output value of type Boolean.
Behavior
Generates a JavaScript replace(new RegExp(...), ...) expression for the selected text value.
Related Blocks
regexp_testregexp_matchtext_getSubstringtext_changeCase
Set Date Property
Block name: setdateprop
Sets a numeric property on a date value. This block updates the connected date value in place.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| property | choice | The date property to update. | |
| date | date | The date value to update. This is typically provided by a date block, but dateclone can be used first if you want to preserve the original date. | date |
| value | number | The new numeric value for the selected property. This is typically provided by a math_number block. | math_number |
Output
This block does not produce an output value.
Behavior
Generates code that updates a numeric property on the selected ioLoop date object in place. In JavaScript, ioLoop date values can be converted to and from Moment objects using $io.system.momentObjectFromIoLoopDate and $io.system.ioLoopDateFromMomentObject.
Calls: TvWaDate.year, TvWaDate.month, TvWaDate.dayOfMonth, TvWaDate.hours, TvWaDate.minutes, TvWaDate.seconds
Related Blocks
Test or Preview Mode
Block name: is_test_mode
Checks whether the current runtime is running in test mode or preview mode.
Output
This block produces an output value of type Boolean.
Behavior
Generates code that queries the ioLoop system runtime for the current test or preview mode state.
Calls: $io.system.isTestMode
Related Blocks
current_user_namequery_user_groupwait_for_logininfo
Text Ends With
Block name: string_endswith
Checks whether a text value ends with another text value.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| text | string | The text to inspect. | |
| pattern | string | The ending text to look for. This is typically provided by a text block. | text |
Output
This block produces an output value of type Boolean.
Behavior
Generates a JavaScript endsWith(...) expression for the selected text value.
Related Blocks
string_startswithregexp_testtext_indexOf
Text from Date
Block name: datetostring
Formats a date value as text using the provided format string.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| date | date | The date value to format. This is typically provided by a date block, but other date-producing blocks such as datefromstring can also be used. | date |
| format | string | The format string used to convert the date to text. |
Output
This block produces an output value of type String.
Behavior
Generates code that formats the selected ioLoop date object as text. In JavaScript, ioLoop date values can be converted to and from Moment objects using $io.system.momentObjectFromIoLoopDate and $io.system.ioLoopDateFromMomentObject.
Calls: TvWaDate.toString2
Related Blocks
Text Matches Pattern
Block name: regexp_test
Checks whether a text value matches a regular expression pattern.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| text | string | The text to test. | |
| pattern | string | The regular expression pattern. This is typically provided by a text block. | text |
| options | string | The regular expression flags such as i or ig. This is typically provided by a text block. | text |
Output
This block produces an output value of type Boolean.
Behavior
Generates a JavaScript RegExp(...).test(...) expression using the selected pattern and flags.
Related Blocks
Text Starts With
Block name: string_startswith
Checks whether a text value starts with another text value.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| text | string | The text to inspect. | |
| pattern | string | The starting text to look for. This is typically provided by a text block. | text |
Output
This block produces an output value of type Boolean.
Behavior
Generates a JavaScript startsWith(...) expression for the selected text value.
Related Blocks
string_endswithregexp_testtext_indexOf
Timer: After
Block name: srv_rearmabletimer
Schedules a server-side timer that runs the nested statements after the specified delay.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| duration | number | The amount of time to wait before the timer callback runs. This is typically provided by a math_number block. | math_number |
| units | choice | The time unit for the delay. | |
| do | statements | The statements to run when the timer fires. Inside this block, srv_rearmtimer can be used to arm the same timer again for another cycle. Nested blocks run inside the generated callback for this block. customcode and customcodeexpr blocks inside this area can directly access the documented callback-scope variables. |
Output
This block does not produce an output value.
Behavior
Generates server-side code that creates a timer through $io.system.createTimer. The nested blocks are emitted inside function(timerObj, infoObj) { ... }, so customcode and customcodeexpr blocks inside the timer callback can access timerObj and infoObj directly. The selected units are passed into $io.system.createTimer(...).
Calls: $io.system.createTimer
Related Blocks
Timer: Repeat
Block name: srv_rearmtimer
Re-arms the current timer so it runs again after its configured interval.
Output
This block does not produce an output value.
Behavior
Generates server-side code that re-arms the current timer object when timerObj is available in the active timer callback context. At runtime, $io.system.reArmTimer(timerObj) calls timerObj.arm() on that timer instance.
Calls: $io.system.reArmTimer
Related Blocks
User Group
Block name: user_group_sel
Provides a predefined user group identifier.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| group | choice | The predefined user group to use. |
Output
This block produces an output value of type Number.
Behavior
Generates the numeric identifier of the selected predefined user group for use in shared user-membership checks.
Related Blocks
User Role
Block name: user_role_sel
Provides a predefined user role level identifier.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| role | choice | The predefined user role level to use. |
Output
This block produces an output value of type Number.
Behavior
Generates the numeric identifier of the selected predefined user role level for use in shared user-membership checks.
Related Blocks
Wait for Multiple Deferred Tasks Completion
Block name: promisecombine
Combines multiple deferred tasks into a single Promise using either all or any mode.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| mode | choice | How the deferred tasks should be combined. | |
| deferred tasks | array | The list of Promises or deferred tasks to combine. This is typically provided by a list block containing Promise values. |
Output
This block produces an output value of type Promise.
Behavior
Generates either Promise.all(...) or Promise.any(...) for the selected list of deferred tasks, depending on the chosen mode.
Related Blocks
Wait on Deferred Task Completion
Block name: promiseawait
Waits for a deferred task to complete before continuing. This block emits a direct await statement, so it must be used inside an async context such as the then do area of a promisethen block.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| deferred task | promise | The Promise or deferred task to wait on. This is typically provided by a promisecreate block or another block that returns a Promise. | promisecreate |
Output
This block does not produce an output value.
Behavior
Generates a bare JavaScript await <promise>; statement. Because it emits direct await code, it requires an async context such as the callback generated by promisethen.
Related Blocks
Wait on Deferred Task Completion
Block name: promiseawaitret
Waits for a deferred task to complete and returns its resolved value. This block emits a direct await expression, so it must be used inside an async context such as the then do area of a promisethen block.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| deferred task | promise | The Promise or deferred task to wait on. This is typically provided by a promisecreate block or another block that returns a Promise. | promisecreate |
Output
This block produces an output value of type Any.
Behavior
Generates a JavaScript (await <promise>) expression. Because it emits direct await code, it requires an async context such as the callback generated by promisethen.
Related Blocks
Wait on Deferred Task to Complete and Then Do
Block name: promisethen
Waits for a deferred task to complete and then runs the nested statements. The nested then do area runs in an async function, so other deferred tasks can be awaited directly inside it.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| deferred task | promise | The Promise or deferred task to wait on. This is typically provided by a promisecreate block or another block that returns a Promise. | promisecreate |
| then do | statements | The statements to run after the deferred task completes. Inside this area, the promiseresult block provides the resolved value of the deferred task, and other deferred tasks can be awaited directly with blocks such as promiseawait or promiseawaitret because this callback is generated as an async function. Nested blocks run inside the generated callback for this block. customcode and customcodeexpr blocks inside this area can directly access the documented callback-scope variables. |
Output
This block does not produce an output value.
Behavior
Generates a Promise.resolve(...).then(async function(tvwaPromiseResult) { ... }) wrapper and runs the nested statements after the Promise resolves. The resolved value is exposed inside that callback through tvwaPromiseResult, so customcode and customcodeexpr blocks inside the completion callback can access tvwaPromiseResult directly. The async callback means nested blocks can emit direct await expressions safely.
Related Blocks
Write Log Message
Block name: log_msg_str
Writes a message to the runtime log output or ioLoop cloud logs.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| message | string | The message to write to the log. This is typically provided by a text block. | text |
| category | string | An optional log category such as info, error, or warning. | |
| level | number | An optional log level number. |
Output
This block does not produce an output value.
Behavior
Generates code that writes the provided message, category, and level through the ioLoop system logging runtime.
Calls: $io.system.log

