Data Table Custom Query
Last updated
Last updated
The Data Table Custom Query
block allows you to use a custom Database Query for the Data Table widget.
Normally the Data Table widget reads the Database Table without any match criteria or sorting rule. This block allows you to use a custom Database Query with matching criteria and/or sorting rules.
The block consists of the following (from top to bottom):
Data Table: Selectable Input to choose the Data Table widget from your page.
Query Name: a Value Parameter that accepts a text value representing the name of the Database Query to use.
Input Params: a Value Parameter that accepts a list value containing the matching criteria values for the various inputs used by the selected Database Query .
Per Page: a Value Parameter that accepts a numeric value that specifies the number of records to load and display per page.
NOTE:
To enable the functionality of this block, ensure that the Custom Query setting of the Data Table widget is activated.
The Query Name value parameter needs to point to a valid Database Query defined in the associated Database Table.
The Data Table Refresh block needs to follow this block for the Data Table widget to load and display records.
The image below shows an example of the Data Table Custom Query block where the Database Query named Q1 is used. A list containing two items is used as the matching criteria (via Input Params). The number of records per page is set to 10.
As previously mentioned, it's important to place a Data Table Refresh block after this one to ensure that the Data Table widget loads and presents the records. This is demonstrated in the example as well.