Appearance
General
Page Flow Blocks reference.
Blocks
- " value "
- Action/Event Info
- Add to List Contents of List
- Add to or Subtract from Date
- Alert Text
- Badged Text
- Boolean ( value )
- Cloud Flow Invoke Hook
- Cloud Flow: URL of Web Hook
- Collapsible Area Action
- Compare Dates
- Complete Deferred Task
- Create Deferred Task
- Current User
- Current User is in Group and Role
- Data Table Action Menu Customize
- Data Table Add Action
- Data Table Custom Query
- Data Table Refresh
- Date
- Date from Text
- Date is in a Leap Year
- Date is in DST
- Days in Month for Date
- Difference Between Dates
- DOM Selector
- Element
- Enable/Disable Element
- Event Action
- Exit Function
- Exit Function and Return
- Find Pattern in Text
- Flow Start
- Generate JSON
- Get Date Property
- Get Element Attribute
- Get Element by Name
- Get Input Value
- Get Toggle Switch State
- is a Valid Number
- Log Category
- Login Verify Complete (Deferred)
- Menu Index
- Menu Text
- 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 CSS
- Set Date Property
- Set Element Attribute
- Set Input Feedback
- Set Input Value
- Set Style
- Set Toggle Switch State
- Set Value of Field Input
- Show Menu
- Status Animation
- Stop Typing Animation
- Test or Preview Mode
- Text Ends With
- Text from
- Text from Date
- Text Matches Pattern
- Text Starts With
- Timer
- Timer Repeat
- Trigger Embed Resize
- Typing Animation
- URL Parameter Value
- User Group
- User Role
- Value of Field Input
- 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
" value "
Block name: converttotext2
Converts a value to text using the newer block shape. From the user's perspective, it behaves the same as converttotext.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| value | object | The value to convert to text. |
Output
This block produces an output value of type String.
Behavior
Delegates to the same text-conversion generator behavior as converttotext, producing a JavaScript string conversion of the selected value.
Related Blocks
converttotexttexttext_joingenjson
Action/Event Info
Block name: mkbevinfo
Provides the current event information object inside an event action callback.
Output
This block produces an output value of type Any.
Behavior
Generates client-side code that returns the current tvEventInfo callback parameter when available. Event handlers created by $io.dom.setEventListener populate this object before invoking the callback.
Calls: $io.dom.setEventListener
Related Blocks
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
Alert Text
Block name: alert
Creates alert-styled content and returns it as a string value that can be inserted into page content.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| alert type | choice | The alert behavior. | |
| alert color | choice | The visual style of the alert. | |
| text | string | The text shown inside the alert. This is typically provided by a text block. | text |
Output
This block produces an output value of type String.
Behavior
Generates client-side code that builds alert-formatted content for insertion into other content blocks.
Calls: $io.content.alert
Related Blocks
Badged Text
Block name: badge
Creates badge-styled content and returns it as a string value that can be inserted into page content.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| badge shape | choice | The visual shape of the badge. | |
| badge color | choice | The visual style of the badge. | |
| text | string | The text shown inside the badge. This is typically provided by a text block. | text |
Output
This block produces an output value of type String.
Behavior
Generates client-side code that builds badge-formatted content for insertion into other content blocks.
Calls: $io.content.badgedText
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
Cloud Flow Invoke Hook
Block name: scr_hook_httppost
Invokes a Web Hook Cloud Flow using HTTP POST and then runs the nested success or failure statements.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| URL | string | The Web Hook Cloud Flow URL to invoke. This is typically provided by a scr_hook_url block, which lets you click the lookup button to select from valid web hooks available in the current context. | scr_hook_url |
| data | object | The data to send to the web hook. This is typically provided by a define_object block. | |
| on success | statements | The statements to run when the web hook call succeeds. Inside this block, httpdata provides the returned response data. 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. | |
| on failure | statements | The statements to run when the web hook call fails. Inside this block, httperr provides the returned error information. 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 client-side code that invokes the selected Web Hook Cloud Flow through the ioLoop system runtime and runs the nested success or failure statements from the returned promise. The nested blocks are emitted inside function(result) { ... }; the success branch defines tvwaHttpData, and the failure branch defines tvwaHttpErr, so customcode and customcodeexpr blocks inside those branches can access the matching in-scope variables directly.
Calls: $io.system.execCloudFlowWebHook
Related Blocks
Cloud Flow: URL of Web Hook
Block name: scr_hook_url
Provides the URL of a selected Web Hook Cloud Flow.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| web hook | cloud flow web hook | The Web Hook Cloud Flow to use. You can type the web hook name directly or click the lookup button to select from valid web hooks available in the current context. |
Output
This block produces an output value of type String.
Behavior
Generates a string literal containing the URL of the selected Web Hook Cloud Flow.
Related Blocks
Collapsible Area Action
Block name: collapsecontrol2
Expands, collapses, or toggles a collapsible area element on a page or form.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| action | choice | The collapsible area action to perform. | |
| element | element | The id of the collapsible area element to control. This is typically provided by an Element block or a DOM Selector block. Use the Element block for a target element HTML id attribute value, or the DOM Selector block for a DOM selector string. Do not use AI IDs such as ai:... or data-tvwa-ai-id. | elementidasstring, domselasstring |
Output
This block does not produce an output value.
Behavior
Generates client-side code that resolves the target element from the connected element or DOM Selector block and applies the selected collapsible area action.
Calls: $io.dom.elementIdSel, $io.dom.domSel, $io.ui.controlCollapsibleArea
Related Blocks
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
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
Data Table Action Menu Customize
Block name: datatablerowactionconf
Shows or hides the default New, Edit, Delete, and Refresh options in a Data Table action menu.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| data table | element | The id of the Data Table widget whose action menu should be customized. Use the element's HTML id attribute value. Do not use AI IDs such as ai:... or data-tvwa-ai-id; those IDs are only for modification commands. You can type the element id directly or click the lookup button to select from valid elements available in the current context. | |
| new | choice | Whether the New action should be shown or hidden. | |
| edit | choice | Whether the Edit action should be shown or hidden. | |
| delete | choice | Whether the Delete action should be shown or hidden. | |
| refresh | choice | Whether the Refresh action should be shown or hidden. |
Output
This block does not produce an output value.
Behavior
Generates client-side code that resolves the Data Table widget element and sends a customize-action-menu command with the selected visibility flags.
Calls: $io.dom.elementIdSel, $io.ui.widgetCommand
Related Blocks
Data Table Add Action
Block name: datatableaddcustomaction
Adds a custom option to a Data Table action menu and runs the nested logic when the user selects it.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| data table | element | The id of the Data Table widget whose action menu should receive the custom option. Use the element's HTML id attribute value. Do not use AI IDs such as ai:... or data-tvwa-ai-id; those IDs are only for modification commands. You can type the element id directly or click the lookup button to select from valid elements available in the current context. | |
| label | string | The text shown for the custom menu option. | |
| icon | string | The icon name or class to use for the custom menu option. | |
| on selection | statements | The blocks to run when the custom menu option is selected. Use the Data Table: Table Name and Data Table: Data blocks inside these statements to access the current callback context. 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 client-side code that resolves the Data Table widget element and sends an add-action command with a callback containing the nested statements. The nested blocks are emitted inside function(dataTableInfo, dataTableRow) { ... }, so customcode and customcodeexpr blocks inside the custom action callback can access dataTableInfo and dataTableRow directly.
Calls: $io.dom.elementIdSel, $io.ui.widgetCommand
Related Blocks
Data Table Custom Query
Block name: datatablequery
Sets a custom query configuration for a Data Table widget.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| data table | element | The id of the Data Table widget that should use the custom query. Use the element's HTML id attribute value. Do not use AI IDs such as ai:... or data-tvwa-ai-id; those IDs are only for modification commands. You can type the element id directly or click the lookup button to select from valid elements available in the current context. | |
| query name | string | The custom query name to use. This is typically provided by a text block. | text |
| input params | array | The input parameter list for the custom query. This is typically provided by a list block. | lists_create_with |
| per page | number | The number of records to load per page. This is typically provided by a number block. | math_number |
Output
This block does not produce an output value.
Behavior
Generates client-side code that resolves the Data Table widget element and sends a set-custom-query command with the selected query settings.
Calls: $io.dom.elementIdSel, $io.ui.widgetCommand
Related Blocks
Data Table Refresh
Block name: datatablerefresh
Reloads the current page of records in a Data Table widget.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| data table | element | The id of the Data Table widget to refresh. Use the element's HTML id attribute value. Do not use AI IDs such as ai:... or data-tvwa-ai-id; those IDs are only for modification commands. You can type the element id directly or click the lookup button to select from valid elements available in the current context. |
Output
This block does not produce an output value.
Behavior
Generates client-side code that resolves the Data Table widget element and sends a refresh command.
Calls: $io.dom.elementIdSel, $io.ui.widgetCommand
Related Blocks
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
DOM Selector
Block name: domselasstring
Creates a DOM selector string that can target one or more page or form elements.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| selector | string | The DOM selector string to use. Standard CSS selector syntax is supported. Do not use AI IDs such as ai:...; those IDs are only for modification commands. |
Output
This block produces an output value of type String.
Behavior
Generates the selector string exactly as entered. Blocks that consume this value pass it to $io.dom.domSel before calling the relevant ioLoop DOM API.
Related Blocks
Element
Block name: elementidasstring
Creates an element selector string for a selected page or form element using the element's HTML id attribute value.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| element | element | The id of the page or form element to reference. Use the element's HTML id attribute value. Do not use AI IDs such as ai:... or data-tvwa-ai-id; those IDs are only for modification commands. You can type the element id directly or click the lookup button to select from valid elements available in the current context. |
Output
This block produces an output value of type String.
Behavior
Generates a selector string for the chosen element by prefixing the element's HTML id attribute value with #. The block itself does not call an ioLoop framework method directly.
Related Blocks
Enable/Disable Element
Block name: enabledisableelement2
Enables or disables an element on a page or form.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| element | element | The id of the element whose enabled state should be updated. This is typically provided by an Element block or a DOM Selector block. Use the Element block for a target element HTML id attribute value, or the DOM Selector block for a DOM selector string. Do not use AI IDs such as ai:... or data-tvwa-ai-id. | elementidasstring, domselasstring |
| state | boolean | The enabled state to assign to the selected element. Use true to enable the element and false to disable it. This is typically provided by a boolean block. | logic_boolean |
Output
This block does not produce an output value.
Behavior
Generates client-side code that resolves the target element from the connected element or DOM Selector block and sets its disabled property. The boolean input is inverted so true enables the element and false disables it.
Calls: $io.dom.elementIdSel, $io.dom.domSel, $io.dom.setProp
Related Blocks
Event Action
Block name: eventhandler2
Runs the nested logic when the specified event occurs for the chosen page or form element. Use the Action/Event Info block (mkbevinfo) inside the nested logic when you need information about the event that triggered the handler.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| event | string | The event name to listen for. This is typically provided by a text block. | text |
| element | element | The id of the page or form element to monitor for the specified event. This is typically provided by an Element block or a DOM Selector block. Use the Element block for a target element HTML id attribute value, or the DOM Selector block for a DOM selector string. Do not use AI IDs such as ai:... or data-tvwa-ai-id. | elementidasstring, domselasstring |
| tasks | statements | The blocks to run when the specified event occurs. Use the Action/Event Info block (mkbevinfo) inside these statements to access the current event information object, including the underlying DOM event details documented by the $io.dom.setEventListener client API. 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 client-side code that resolves the target element from the connected element or DOM Selector block and registers an event listener using $io.dom.setEventListener. The nested blocks are emitted inside function(tvEventInfo) { ... }, so customcode and customcodeexpr blocks inside the handler can access tvEventInfo directly. The mkbevinfo block returns that same object.
Calls: $io.dom.elementIdSel, $io.dom.domSel, $io.dom.setEventListener
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
Get Element Attribute
Block name: attributevalue2
Gets the value of an HTML attribute from a selected element on a page or form.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| attribute | string | The HTML attribute name to read from the selected element. This is typically provided by a text block. | text |
| element | element | The id of the element whose attribute value should be read. This is typically provided by an Element block or a DOM Selector block. Use the Element block for a target element HTML id attribute value, or the DOM Selector block for a DOM selector string. Do not use AI IDs such as ai:... or data-tvwa-ai-id. | elementidasstring, domselasstring |
Output
This block produces an output value of type String.
Behavior
Generates client-side code that resolves the target element from the connected element or DOM Selector block and reads the requested HTML attribute value.
Calls: $io.dom.elementIdSel, $io.dom.domSel, $io.dom.getAttr
Related Blocks
Get Element by Name
Block name: elementbyname
Gets a page or form element by its element name.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| name | string | The element name to look up. This is typically provided by a text block. | text |
Output
This block produces an output value of type Any.
Behavior
Generates client-side code that looks up the first matching DOM element by its element name.
Calls: $io.dom.elementByName
Related Blocks
Get Input Value
Block name: getinputvalue2
Gets the current value of an input, dropdown, or multi-line element on a page or form.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| element | element | The id of the input, dropdown, or multi-line element whose value should be read. This is typically provided by an Element block or a DOM Selector block. Use the Element block for a target element HTML id attribute value, or the DOM Selector block for a DOM selector string. Do not use AI IDs such as ai:... or data-tvwa-ai-id. | elementidasstring, domselasstring |
Output
This block produces an output value of type String.
Behavior
Generates client-side code that resolves the target element from the connected element or DOM Selector block and reads its current value.
Calls: $io.dom.elementIdSel, $io.dom.domSel, $io.dom.getVal
Related Blocks
Get Toggle Switch State
Block name: checkboxstate2
Gets the current checked state of a checkbox or toggle switch element on a page or form.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| element | element | The id of the checkbox or toggle switch element whose state should be read. This is typically provided by an Element block or a DOM Selector block. Use the Element block for a target element HTML id attribute value, or the DOM Selector block for a DOM selector string. Do not use AI IDs such as ai:... or data-tvwa-ai-id. | elementidasstring, domselasstring |
Output
This block produces an output value of type Boolean.
Behavior
Generates client-side code that resolves the target element from the connected element or DOM Selector block and reads its checked property.
Calls: $io.dom.elementIdSel, $io.dom.domSel, $io.dom.getProp
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
Login Verify Complete (Deferred)
Block name: wait_for_logininfo
Returns a deferred task that completes when client-side login verification information is available. This is useful when later blocks need user or group information that may not be ready immediately during page startup.
Output
This block produces an output value of type Promise.
Behavior
Generates client-side code that calls the ioLoop system runtime to wait until authentication and login verification information is ready.
Calls: $io.system.waitForAuthInfo
Related Blocks
Menu Index
Block name: menu_selected_idx
Provides the numeric index of the menu option selected by the user inside a Show Menu callback.
Output
This block produces an output value of type Number.
Behavior
Generates client-side code that returns the selected menu option index from the current Show Menu callback context when available.
Related Blocks
Menu Text
Block name: menu_selected_text
Provides the text of the menu option selected by the user inside a Show Menu callback.
Output
This block produces an output value of type String.
Behavior
Generates client-side code that returns the selected menu option text from the current Show Menu callback context when available.
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 CSS
Block name: setcssclass2
Adds and or removes CSS classes from a selected page or form element.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| element | element | The id of the page or form element whose CSS classes should be updated. This is typically provided by an Element block or a DOM Selector block. Use the Element block for a target element HTML id attribute value, or the DOM Selector block for a DOM selector string. Do not use AI IDs such as ai:... or data-tvwa-ai-id. | elementidasstring, domselasstring |
| add classes | string | Space-separated CSS classes to add to the element. This is typically provided by a text block. | text |
| remove classes | string | Space-separated CSS classes to remove from the element. This is typically provided by a text block. | text |
Output
This block does not produce an output value.
Behavior
Generates client-side code that resolves the target element from the connected element or DOM Selector block and adds or removes CSS class names on it.
Calls: $io.dom.elementIdSel, $io.dom.domSel, $io.dom.modClasses
Related Blocks
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
Set Element Attribute
Block name: setattributevalue2
Sets the value of an HTML attribute on a selected element on a page or form.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| attribute | string | The HTML attribute name to set on the selected element. This is typically provided by a text block. | text |
| element | element | The id of the element whose attribute value should be updated. This is typically provided by an Element block or a DOM Selector block. Use the Element block for a target element HTML id attribute value, or the DOM Selector block for a DOM selector string. Do not use AI IDs such as ai:... or data-tvwa-ai-id. | elementidasstring, domselasstring |
| value | string | The value to assign to the selected attribute. This is typically provided by a text block. | text |
Output
This block does not produce an output value.
Behavior
Generates client-side code that resolves the target element from the connected element or DOM Selector block and sets the requested HTML attribute value.
Calls: $io.dom.elementIdSel, $io.dom.domSel, $io.dom.setAttr
Related Blocks
Set Input Feedback
Block name: setinputfeedback2
Sets the validation feedback state for an input, dropdown, multi-line, checkbox, or toggle switch element on a page or form.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| element | element | The id of the element whose feedback state should be updated. This is typically provided by an Element block or a DOM Selector block. Use the Element block for a target element HTML id attribute value, or the DOM Selector block for a DOM selector string. Do not use AI IDs such as ai:... or data-tvwa-ai-id. | elementidasstring, domselasstring |
| feedback | choice | The feedback state to apply to the selected element. |
Output
This block does not produce an output value.
Behavior
Generates client-side code that resolves the target element from the connected element or DOM Selector block and updates its validation feedback CSS classes.
Calls: $io.dom.elementIdSel, $io.dom.domSel, $io.dom.modClasses
Related Blocks
Set Input Value
Block name: setinputvalue2
Sets the value of an input, dropdown, or multi-line element on a page or form.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| element | element | The id of the input, dropdown, or multi-line element whose value should be updated. This is typically provided by an Element block or a DOM Selector block. Use the Element block for a target element HTML id attribute value, or the DOM Selector block for a DOM selector string. Do not use AI IDs such as ai:... or data-tvwa-ai-id. | elementidasstring, domselasstring |
| value | string | The value to assign to the selected element. This is typically provided by a text block. | text |
Output
This block does not produce an output value.
Behavior
Generates client-side code that resolves the target element from the connected element or DOM Selector block and sets its current value.
Calls: $io.dom.elementIdSel, $io.dom.domSel, $io.dom.setVal
Related Blocks
Set Style
Block name: setstyle2
Sets a CSS property on a selected page or form element.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| property | string | The CSS property name to set. This is typically provided by a text block. | text |
| element | element | The id of the page or form element whose style should be updated. This is typically provided by an Element block or a DOM Selector block. Use the Element block for a target element HTML id attribute value, or the DOM Selector block for a DOM selector string. Do not use AI IDs such as ai:... or data-tvwa-ai-id. | elementidasstring, domselasstring |
| value | string | The value to assign to the CSS property. This is typically provided by a text block. | text |
Output
This block does not produce an output value.
Behavior
Generates client-side code that resolves the target element from the connected element or DOM Selector block and sets a CSS property value on it.
Calls: $io.dom.elementIdSel, $io.dom.domSel, $io.dom.setCss
Related Blocks
Set Toggle Switch State
Block name: setcheckboxstate2
Sets the checked state of a checkbox or toggle switch element on a page or form.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| element | element | The id of the checkbox or toggle switch element whose state should be updated. This is typically provided by an Element block or a DOM Selector block. Use the Element block for a target element HTML id attribute value, or the DOM Selector block for a DOM selector string. Do not use AI IDs such as ai:... or data-tvwa-ai-id. | elementidasstring, domselasstring |
| value | boolean | The state to assign to the selected element. Use true to check the element and false to clear it. This is typically provided by a boolean block. | logic_boolean |
Output
This block does not produce an output value.
Behavior
Generates client-side code that resolves the target element from the connected element or DOM Selector block and sets its checked property.
Calls: $io.dom.elementIdSel, $io.dom.domSel, $io.dom.setProp
Related Blocks
Set Value of Field Input
Block name: setdatafield
Sets the current value of a named form field input element.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| field input | string | The name of the form field input element to update. This is typically provided by a text block. | text |
| value | string | The value to assign to the selected form field input. This is typically provided by a text block, but other blocks that produce a compatible value can also be used. |
Output
This block does not produce an output value.
Behavior
Generates client-side code that updates the current value of a named form field input element.
Calls: $io.form.setFieldValue
Related Blocks
Show Menu
Block name: show_menu
Shows a popup menu with the provided options at the specified screen position and runs the nested logic when the user selects an option.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| options | array | The menu options to show to the user. This is typically provided by a list block. | lists_create_with |
| X position | number | The horizontal position where the popup menu should appear. This can come from event information such as the current event X position. | |
| Y position | number | The vertical position where the popup menu should appear. This can come from event information such as the current event Y position. | |
| on selection | statements | The blocks to run when the user selects a menu option. Use the Menu Text and Menu Index blocks inside these statements to access the selected option. 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 client-side code that shows a popup menu with the provided options and wires the nested statements into the menu selection callback. The nested blocks are emitted inside function(tvwaMenuText, tvwaMenuIndex) { ... }, so customcode and customcodeexpr blocks inside the menu selection callback can access tvwaMenuText and tvwaMenuIndex directly.
Calls: $io.ui.showMenu
Related Blocks
Status Animation
Block name: spinner
Creates a visual loading or status indicator and returns it as a string value that can be inserted into page content.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| animation type | choice | The animation style to display. | |
| color | choice | The visual style of the indicator. | |
| size | choice | The size of the indicator. |
Output
This block produces an output value of type String.
Behavior
Generates client-side code that builds a status or loading indicator for insertion into other content blocks.
Calls: $io.content.statusIndicator
Related Blocks
Stop Typing Animation
Block name: typewriting_animation_stop
Stops the typing animation for the selected element.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| element | element | The id of the element whose typing animation should be stopped. This is typically provided by an Element block or a DOM Selector block. Use the Element block for a target element HTML id attribute value, or the DOM Selector block for a DOM selector string. Do not use AI IDs such as ai:... or data-tvwa-ai-id. | elementidasstring, domselasstring |
Output
This block does not produce an output value.
Behavior
Generates client-side code that stops the typewriter animation helper for the selected element or DOM selector.
Calls: $tvDom.stopTypeWriterAnimation
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
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
Block name: converttotext
Converts a value to text.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| value | object | The value to convert to text. |
Output
This block produces an output value of type String.
Behavior
Generates a JavaScript string conversion using String(...) and falls back to an empty string when no value is connected.
Related Blocks
converttotext2texttext_joingenjson
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
Block name: rearmabletimer
Runs the nested logic after the specified number of milliseconds has elapsed.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| time amount | number | The timer interval in milliseconds. This is typically provided by a number block. | math_number |
| tasks | statements | The blocks to run when the timer fires. 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 client-side code that creates an ioLoop 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.
Calls: $io.system.createTimer
Related Blocks
Timer Repeat
Block name: rearmtimer
Re-arms the current timer so the timer block runs again using the same interval.
Output
This block does not produce an output value.
Behavior
Generates client-side code that re-arms the current timer when used inside a timer callback context.
Calls: $io.system.reArmTimer
Related Blocks
Trigger Embed Resize
Block name: embed_resize
Triggers an embed resize event for the current app view.
Output
This block does not produce an output value.
Behavior
Generates client-side code that requests an embed resize through the ioLoop UI runtime.
Calls: $io.ui.embedResize
Typing Animation
Block name: typewriting_animation
Starts or resumes a typing animation for the selected element using the provided list of text values.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| action | choice | Whether to start a new animation or resume an existing one. | |
| element | element | The id of the element that should display the typing animation. This is typically provided by an Element block or a DOM Selector block. Use the Element block for a target element HTML id attribute value, or the DOM Selector block for a DOM selector string. Do not use AI IDs such as ai:... or data-tvwa-ai-id. | elementidasstring, domselasstring |
| text list | array | The list of text values to animate. This is typically provided by a list block. | lists_create_with |
| options | object | Optional animation settings object. |
Output
This block does not produce an output value.
Behavior
Generates client-side code that starts or resumes the typewriter animation helper for the selected element or DOM selector and text list.
Calls: $tvDom.startTypeWriterAnimation
Related Blocks
URL Parameter Value
Block name: url_param_by_name
Gets the value of a URL query string parameter by name.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| name | string | The query string parameter name to look up. This is typically provided by a text block. | text |
Output
This block produces an output value of type String.
Behavior
Generates client-side code that reads a URL query string parameter value by name.
Calls: $io.system.queryParameterValue
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
Value of Field Input
Block name: getdatafield
Gets the current value of a named form field input element.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| field input | string | The name of the form field input element to read. This is typically provided by a text block. | text |
Output
This block produces an output value of type Any.
Behavior
Generates client-side code that reads the current value of a named form field input element.
Calls: $io.form.getFieldValue
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

