Appearance
Database
Page Flow Blocks reference.
Blocks
- Clear Dataset
- Data Add Record
- Data Delete Record with ID
- Data Input Popup
- Data Lookup
- Data Lookup with ID
- Data Query Name
- Data Read
- Data Read Next
- Data Read Previous
- Data Record
- Data Record at Index
- Data Record Count
- Data Record ID
- Data Record Index
- Data Record List
- Data Record Loop
- Data Status
- Data Table Name
- Data Update Record with ID
- Delete Data Record Files
- List of Files for Data Record
- Unique Dataset Name
Clear Dataset
Block name: data_clear_dataset
Clears the current dataset contents for the selected table and dataset name.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| table | table | The database table whose dataset should be cleared. This is typically provided by a data_table_name block. | data_table_name |
| dataset name | string | The dataset name to clear. This is typically provided by a text block. | text |
Output
This block does not produce an output value.
Behavior
Generates code that clears the selected dataset from the ioLoop data runtime.
Calls: $io.db.clearDataset
Related Blocks
Data Add Record
Block name: data_create_with_obj
Starts an add-record operation for a table using the provided record data object.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| table | table | The database table where the new record should be added. This is typically provided by a data_table_name block. | data_table_name |
| dataset name | string | The dataset name associated with the add operation. This is typically provided by a text block. | text |
| dataset refresh | boolean | Whether the dataset should be refreshed after the record is added. This is typically provided by a logic_boolean block. | logic_boolean |
| record data | object | The field values for the new record. This is typically provided by a define_object block. | define_object |
Output
This block does not produce an output value.
Behavior
Generates code that starts an add-record operation with the provided record object and dataset refresh option.
Calls: $io.db.create
Related Blocks
Data Delete Record with ID
Block name: data_delete2
Starts a delete operation for an existing record in a table using its record ID.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| table | table | The database table containing the record to delete. This is typically provided by a data_table_name block. | data_table_name |
| dataset name | string | The dataset name associated with the delete operation. This is typically provided by a text block. | text |
| dataset refresh | boolean | Whether the dataset should be refreshed after the delete completes. This is typically provided by a logic_boolean block. | logic_boolean |
| record ID | string | The unique identifier of the record to delete. This is typically provided by a text block, but data_record_id can also be used when you already have a record object. |
Output
This block does not produce an output value.
Behavior
Generates code that starts a delete-by-ID operation with the provided dataset refresh option.
Calls: $io.db.deleteById
Related Blocks
Data Input Popup
Block name: data_input
Shows a modal data input form for a table and runs the nested success statements when the user completes it.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| title | string | The title shown on the popup. This is typically provided by a text block. | text |
| table | table | The database table whose form should be shown. This is typically provided by a data_table_name block. | data_table_name |
| dataset name | string | The dataset name associated with the popup operation. This is typically provided by a text block. | text |
| data | object | Optional initial field values for the popup. This is often provided by a define_object block when pre-filling values, but a record object from another data block can also be used. | |
| dataset refresh | boolean | Whether the dataset should be refreshed after the popup completes successfully. This is typically provided by a logic_boolean block. | logic_boolean |
| on success | statements | The statements to run after the popup completes successfully. 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 the ioLoop data input modal and runs the nested success statements with the modal result when the user completes it. The nested blocks are emitted inside function(tvwaDataInput, refreshReq) { ... }, so customcode and customcodeexpr blocks inside the success callback can access tvwaDataInput and refreshReq directly.
Calls: $io.db.showInputModal
Related Blocks
Data Lookup
Block name: data_qget2
Starts a lookup operation that searches for matching records in a table and stores the result in a dataset.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| table | table | The database table to search. This is typically provided by a data_table_name block. | data_table_name |
| dataset name | string | The dataset name where the lookup result should be stored. This is typically provided by a text block. | text |
| criteria | object | The lookup criteria to match against the table fields. This is typically provided by a define_object block so the criteria fields are named explicitly. | define_object |
Output
This block does not produce an output value.
Behavior
Generates code that starts a dataset-backed lookup operation using the selected table and criteria object.
Calls: $io.db.lookup
Related Blocks
Data Lookup with ID
Block name: data_qgetid2
Looks up a record in a table by record ID and runs the nested success or error statements when the lookup finishes.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| table | table | The database table to search. This is typically provided by a data_table_name block. | data_table_name |
| dataset name | string | The dataset name associated with the lookup. This is typically provided by a text block. | text |
| record ID | string | The unique record identifier to look up. This is typically provided by a text block, but data_record_id can also be used when you already have a record object. | |
| on success | statements | The statements to run when the record is found successfully. Inside this block, data_record_object provides the returned record. 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 error | statements | The statements to run when the lookup fails. 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 code that looks up a record by ID and runs the nested success or error statements based on the lookup result. The nested blocks are emitted inside function(result) { ... }; the success branch defines tvwaDataRecord, and the error branch defines tvDataErrInfo, so customcode and customcodeexpr blocks inside those branches can access the matching in-scope variables directly.
Calls: $io.db.lookupById
Related Blocks
Data Query Name
Block name: data_query_id
Provides the name of a configured database query for a table.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| query | query | The database query name to use. You can type the query name directly or click the lookup button to select from valid queries available in the current context. |
Output
This block produces an output value of type String.
Behavior
Generates a string literal containing the selected database query name.
Related Blocks
Data Read
Block name: data_query2
Starts a read operation for a table, optionally using a named query and input criteria, and stores the results in a dataset.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| table | table | The database table to read from. This is typically provided by a data_table_name block. | data_table_name |
| query | query | The named database query to use. This is typically provided by a data_query_id block. | data_query_id |
| dataset name | string | The dataset name where the read results should be stored. This is typically provided by a text block. | text |
| per page | number | The maximum number of records to load per page. This is typically provided by a math_number block. | math_number |
| input | object | The input criteria passed to the query. This is typically provided by a define_object block so the query fields are named explicitly. | define_object |
Output
This block does not produce an output value.
Behavior
Generates code that starts a dataset-backed read operation using the selected table, query, page size, and criteria object.
Calls: $io.db.readQuery
Related Blocks
data_table_namedata_query_iddefine_objectdata_status2data_read_next2data_read_prev2data_read_count2data_read_for_each2data_record_list
Data Read Next
Block name: data_read_next2
Starts reading the next page of records for the selected table and dataset.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| table | table | The database table whose next dataset page should be read. This is typically provided by a data_table_name block. | data_table_name |
| dataset name | string | The dataset name to continue reading. This is typically provided by a text block. | text |
Output
This block does not produce an output value.
Behavior
Generates code that starts loading the next page of records for an existing dataset.
Calls: $io.db.readNext
Related Blocks
Data Read Previous
Block name: data_read_prev2
Starts reading the previous page of records for the selected table and dataset.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| table | table | The database table whose previous dataset page should be read. This is typically provided by a data_table_name block. | data_table_name |
| dataset name | string | The dataset name to continue reading. This is typically provided by a text block. | text |
Output
This block does not produce an output value.
Behavior
Generates code that starts loading the previous page of records for an existing dataset.
Calls: $io.db.readPrev
Related Blocks
Data Record
Block name: data_record_object
Provides the current database record object when used inside supported data callback contexts.
Output
This block produces an output value of type Any.
Behavior
Returns the current database record object exposed by data loop and data operation callback contexts when available.
Related Blocks
Data Record at Index
Block name: data_record_by_idx2
Gets the record object at a specific zero-based index from the selected dataset.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| table | table | The database table whose dataset should be read. This is typically provided by a data_table_name block. | data_table_name |
| dataset name | string | The dataset name to read from. This is typically provided by a text block. | text |
| index | number | The zero-based record index to retrieve. This is typically provided by a math_number block. | math_number |
Output
This block produces an output value of type Number.
Behavior
Generates code that retrieves a record object from the current dataset by zero-based index.
Calls: $io.db.getRecordByIndex
Related Blocks
Data Record Count
Block name: data_read_count2
Gets the number of records currently available in the selected dataset for a table.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| table | table | The database table whose current dataset record count should be read. This is typically provided by a data_table_name block. | data_table_name |
| dataset name | string | The dataset name to inspect. This is typically provided by a text block. | text |
Output
This block produces an output value of type Number.
Behavior
Generates code that reads the current record count for a table and dataset from the ioLoop data runtime.
Calls: $io.db.getRecordCount
Related Blocks
Data Record ID
Block name: data_record_id
Gets the unique record identifier from a data record object.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| record | object | The data record object whose unique identifier should be read. This is typically provided by a data_record_object block, but other blocks that return a database record object can also be used. | data_record_object |
Output
This block produces an output value of type String.
Behavior
Generates code that reads the record identifier from a database record object.
Calls: $io.db.getRecordId
Related Blocks
Data Record Index
Block name: data_record_idx
Provides the zero-based index of the current record while running inside a data record loop.
Output
This block produces an output value of type Number.
Behavior
Returns the current per-record loop index from the generated loop context when available.
Related Blocks
Data Record List
Block name: data_record_list
Gets the current list of records stored in the selected dataset for a table.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| table | table | The database table whose dataset records should be returned. This is typically provided by a data_table_name block. | data_table_name |
| dataset name | string | The dataset name to read from. This is typically provided by a text block. | text |
Output
This block produces an output value of type Array.
Behavior
Generates code that retrieves the current list of records stored in a dataset.
Calls: $io.db.getRecordList
Related Blocks
Data Record Loop
Block name: data_read_for_each2
Runs the nested statements once for each record currently available in the selected dataset.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| table | table | The database table whose dataset records should be iterated. This is typically provided by a data_table_name block. | data_table_name |
| dataset name | string | The dataset name to iterate. This is typically provided by a text block. | text |
| do | statements | The statements to run for each record. Inside this block, data_record_idx and data_record_object provide the current record index and record object. 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 code that iterates through each record in the selected dataset and runs the nested statements with per-record context variables. The nested blocks are emitted inside function(tvwaDataRecord, tvwaDataRecordIndex) { ... }, so customcode and customcodeexpr blocks inside the loop callback can access tvwaDataRecord and tvwaDataRecordIndex directly.
Calls: $io.db.forEachPageRecord
Related Blocks
Data Status
Block name: data_status2
Waits for a selected data operation to complete for a table and dataset, then runs the nested success or error statements.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| operation | choice | The data operation type to wait for. | |
| table | table | The database table whose operation status should be tracked. This is typically provided by a data_table_name block. | data_table_name |
| dataset name | string | The dataset name associated with the operation. This is typically provided by a text block. | text |
| on success | statements | The statements to run when the selected operation completes successfully. Inside this block, data_record_object provides the returned record when one is available. 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 error | statements | The statements to run when the selected operation fails. 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 code that waits for completion of the selected data operation and runs the nested success or error statements from the resulting promise. The nested blocks are emitted inside function(result) { ... }; the success branch defines tvwaDataRecord and tvwaDataStatusInfo, and the error branch defines tvDataErrInfo, so customcode and customcodeexpr blocks inside those branches can access the matching in-scope variables directly.
Calls: $io.db.waitForCompletion
Related Blocks
data_query2data_qget2data_qgetid2data_create_with_objdata_update_with_objdata_delete2data_record_object
Data Table Name
Block name: data_table_name
Provides the name of a database table.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| table | table | The database table name to use. You can type the table name directly or click the lookup button to select from valid tables available in the current context. |
Output
This block produces an output value of type String.
Behavior
Generates a string literal containing the selected database table name.
Related Blocks
Data Update Record with ID
Block name: data_update_with_obj
Starts an update operation for an existing record in a table using its record ID and a record data object.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| table | table | The database table containing the record to update. This is typically provided by a data_table_name block. | data_table_name |
| dataset name | string | The dataset name associated with the update operation. This is typically provided by a text block. | text |
| dataset refresh | boolean | Whether the dataset should be refreshed after the update completes. This is typically provided by a logic_boolean block. | logic_boolean |
| record ID | string | The unique identifier of the record to update. This is typically provided by a text block, but data_record_id can also be used when you already have a record object. | |
| record data | object | The field values to update on the record. This is typically provided by a define_object block. | define_object |
Output
This block does not produce an output value.
Behavior
Generates code that starts an update-by-ID operation with the provided record object and dataset refresh option.
Calls: $io.db.updateById
Related Blocks
Delete Data Record Files
Block name: data_delete_files
Deletes one or more files from a file field on an existing data record.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| table | table | The database table containing the record whose files should be deleted. This is typically provided by a data_table_name block. | data_table_name |
| record ID | string | The unique identifier of the record whose files should be deleted. This is typically provided by a text block, but data_record_id can also be used when you already have a record object. | |
| field name | string | The name of the file field on the record. This is typically provided by a text block. | text |
| file name or list | array | The file name or file list information to delete. This can be a file name string or a file list value such as the output of data_files_list. | |
| dataset name | string | The dataset name associated with the delete operation. This is typically provided by a text block. | text |
Output
This block does not produce an output value.
Behavior
Generates code that deletes one or more files from a record's file field and requests a dataset refresh.
Calls: $io.db.deleteFiles
Related Blocks
List of Files for Data Record
Block name: data_files_list
Gets the file list represented by a data record file field value.
Inputs
| Input | Type | Description | Accepts |
|---|---|---|---|
| field value | object | The file field value from a data record. This is typically a field value read from a record object. |
Output
This block produces an output value of type Array.
Behavior
Generates code that converts a data record file field value into the file list structure used by the ioLoop data runtime.
Calls: $io.db.getFileList
Related Blocks
Unique Dataset Name
Block name: data_new_ds_name
Generates a unique dataset name that can be used for a data operation.
Output
This block produces an output value of type String.
Behavior
Generates a unique dataset name string from the ioLoop data runtime.
Calls: $io.db.uniqueDsName

