Skip to content

Database ​

Page Flow Blocks reference.

Blocks ​

Clear Dataset ​

Block name: data_clear_dataset

Clears the current dataset contents for the selected table and dataset name.

Inputs ​

InputTypeDescriptionAccepts
tabletableThe database table whose dataset should be cleared. This is typically provided by a data_table_name block.data_table_name
dataset namestringThe 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

Data Add Record ​

Block name: data_create_with_obj

Starts an add-record operation for a table using the provided record data object.

Inputs ​

InputTypeDescriptionAccepts
tabletableThe database table where the new record should be added. This is typically provided by a data_table_name block.data_table_name
dataset namestringThe dataset name associated with the add operation. This is typically provided by a text block.text
dataset refreshbooleanWhether the dataset should be refreshed after the record is added. This is typically provided by a logic_boolean block.logic_boolean
record dataobjectThe 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

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 ​

InputTypeDescriptionAccepts
tabletableThe database table containing the record to delete. This is typically provided by a data_table_name block.data_table_name
dataset namestringThe dataset name associated with the delete operation. This is typically provided by a text block.text
dataset refreshbooleanWhether the dataset should be refreshed after the delete completes. This is typically provided by a logic_boolean block.logic_boolean
record IDstringThe 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

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 ​

InputTypeDescriptionAccepts
titlestringThe title shown on the popup. This is typically provided by a text block.text
tabletableThe database table whose form should be shown. This is typically provided by a data_table_name block.data_table_name
dataset namestringThe dataset name associated with the popup operation. This is typically provided by a text block.text
dataobjectOptional 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 refreshbooleanWhether the dataset should be refreshed after the popup completes successfully. This is typically provided by a logic_boolean block.logic_boolean
on successstatementsThe 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

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 ​

InputTypeDescriptionAccepts
tabletableThe database table to search. This is typically provided by a data_table_name block.data_table_name
dataset namestringThe dataset name where the lookup result should be stored. This is typically provided by a text block.text
criteriaobjectThe 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

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 ​

InputTypeDescriptionAccepts
tabletableThe database table to search. This is typically provided by a data_table_name block.data_table_name
dataset namestringThe dataset name associated with the lookup. This is typically provided by a text block.text
record IDstringThe 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 successstatementsThe 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 errorstatementsThe 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

Data Query Name ​

Block name: data_query_id

Provides the name of a configured database query for a table.

Inputs ​

InputTypeDescriptionAccepts
queryqueryThe 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.

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 ​

InputTypeDescriptionAccepts
tabletableThe database table to read from. This is typically provided by a data_table_name block.data_table_name
queryqueryThe named database query to use. This is typically provided by a data_query_id block.data_query_id
dataset namestringThe dataset name where the read results should be stored. This is typically provided by a text block.text
per pagenumberThe maximum number of records to load per page. This is typically provided by a math_number block.math_number
inputobjectThe 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

Data Read Next ​

Block name: data_read_next2

Starts reading the next page of records for the selected table and dataset.

Inputs ​

InputTypeDescriptionAccepts
tabletableThe database table whose next dataset page should be read. This is typically provided by a data_table_name block.data_table_name
dataset namestringThe 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

Data Read Previous ​

Block name: data_read_prev2

Starts reading the previous page of records for the selected table and dataset.

Inputs ​

InputTypeDescriptionAccepts
tabletableThe database table whose previous dataset page should be read. This is typically provided by a data_table_name block.data_table_name
dataset namestringThe 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

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.

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 ​

InputTypeDescriptionAccepts
tabletableThe database table whose dataset should be read. This is typically provided by a data_table_name block.data_table_name
dataset namestringThe dataset name to read from. This is typically provided by a text block.text
indexnumberThe 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

Data Record Count ​

Block name: data_read_count2

Gets the number of records currently available in the selected dataset for a table.

Inputs ​

InputTypeDescriptionAccepts
tabletableThe database table whose current dataset record count should be read. This is typically provided by a data_table_name block.data_table_name
dataset namestringThe 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

Data Record ID ​

Block name: data_record_id

Gets the unique record identifier from a data record object.

Inputs ​

InputTypeDescriptionAccepts
recordobjectThe 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

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.

Data Record List ​

Block name: data_record_list

Gets the current list of records stored in the selected dataset for a table.

Inputs ​

InputTypeDescriptionAccepts
tabletableThe database table whose dataset records should be returned. This is typically provided by a data_table_name block.data_table_name
dataset namestringThe 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

Data Record Loop ​

Block name: data_read_for_each2

Runs the nested statements once for each record currently available in the selected dataset.

Inputs ​

InputTypeDescriptionAccepts
tabletableThe database table whose dataset records should be iterated. This is typically provided by a data_table_name block.data_table_name
dataset namestringThe dataset name to iterate. This is typically provided by a text block.text
dostatementsThe 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

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 ​

InputTypeDescriptionAccepts
operationchoiceThe data operation type to wait for.
tabletableThe database table whose operation status should be tracked. This is typically provided by a data_table_name block.data_table_name
dataset namestringThe dataset name associated with the operation. This is typically provided by a text block.text
on successstatementsThe 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 errorstatementsThe 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

Data Table Name ​

Block name: data_table_name

Provides the name of a database table.

Inputs ​

InputTypeDescriptionAccepts
tabletableThe 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.

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 ​

InputTypeDescriptionAccepts
tabletableThe database table containing the record to update. This is typically provided by a data_table_name block.data_table_name
dataset namestringThe dataset name associated with the update operation. This is typically provided by a text block.text
dataset refreshbooleanWhether the dataset should be refreshed after the update completes. This is typically provided by a logic_boolean block.logic_boolean
record IDstringThe 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 dataobjectThe 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

Delete Data Record Files ​

Block name: data_delete_files

Deletes one or more files from a file field on an existing data record.

Inputs ​

InputTypeDescriptionAccepts
tabletableThe database table containing the record whose files should be deleted. This is typically provided by a data_table_name block.data_table_name
record IDstringThe 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 namestringThe name of the file field on the record. This is typically provided by a text block.text
file name or listarrayThe 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 namestringThe 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

List of Files for Data Record ​

Block name: data_files_list

Gets the file list represented by a data record file field value.

Inputs ​

InputTypeDescriptionAccepts
field valueobjectThe 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

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