Zingy Docs
Visit our websiteTry a DemoPricingContact
  • Introduction
  • 🎛️Dashboard
    • Overview
    • Apps
    • Account Profile
    • Billing - View Invoices
    • Billing - Payment Methods
    • Billing - Subscription
  • 💻App Editor
    • App Components
    • App Editor Tour
    • App Settings
    • App Users
    • App User Groups
    • Publishing your App
    • Pages and Forms
      • Create a Page
      • Create a Structured Page
      • What is a Structured Page ?
      • Create a Form
      • Page Editor
      • Working with Forms
    • Page Editor
      • Page Editor Tour
      • Adding Page Content
      • Adding Content to Structured Pages
      • Working with Page Elements
      • Page Element Settings
      • Responsive Design
      • Padding and Margin
      • Editing Text
      • Using AI Wiz in the Page Editor
      • Built-in elements
        • Link
        • Image
        • Spacer
        • Flexible Area
        • Layout Container
        • Layout Row
        • Layout Column
        • 1 Column
        • 2 Columns
        • 3 Columns
        • Add Column
        • Table
        • Table Row
        • Table Column Cell
        • Table Heading Cell
        • Table (3 cols)
        • Table (4 cols)
        • Input
        • Checkbox
        • Toggle Switch
        • Dropdown
        • Multi-line
        • Label
        • Button
        • Button Group
        • Input Group
        • Button Toolbar
        • Menubar Holder
        • Menubar Collapsible
        • Menubar
        • Menubar Item
        • Menubar Item Link
        • Menubar Style1
        • Menubar Style2
        • Menu Item
        • Popup Menu
        • Popup Menu Item
        • Menubar Popup Menu
        • Popup Menu Style1
        • Popup Menu Style2
        • Popup Menu Separator
        • Card
        • Card Group
        • Card Style1
        • Card Style2
        • Card Style3
        • Alert
        • Badged Text
        • Collapsible Area
        • Data Table
        • Stripe Payment
        • Form
        • Menubar Login Info
        • Data Design
      • Working with Forms
      • Using Forms
      • Page Preview
    • Page Settings
    • Page Flow
      • Block Anatomy
      • Toolbox Blocks
        • Set Content
        • Get Content
        • Badged Text
        • Alert Text
        • Status Animation
        • Set Style
        • Set CSS
        • Set Input Value
        • Get Input Value
        • Set Toggle Switch State
        • Get Toggle Switch State
        • Set Input Feedback
        • Enable/Disable Element
        • Set Element Attribute
        • Get Element Attribute
        • Get Element by Name
        • Element
        • URL Parameter Value
        • Navigate Page
        • Timer
        • Timer Repeat
        • Show Popup Form
        • Show Information Popup
        • Show Confirmation Popup
        • Popup Form Data
        • Collapsible Area Action
        • Mouse/Keyboard Action
        • Event Action
        • Action/Event Info
        • Show Menu
        • Menu Text
        • Menu Index
        • Write Log Message
        • Log Category
        • Data Table Action Menu Customize
        • Data Table Attach Form
        • Data Table Add Action
        • Data Table Load Next Page
        • Data Table Load Prev Page
        • Data Table Refresh
        • Data Table Custom Query
        • Data Table : Table Name
        • Data Table : Data
        • Content from Data Design
        • Set Content in Data Design
        • Get Content in Data Design
        • Get Element Attribute in Data Design
        • Set Element Attribute in Data Design
        • Set Style in Data Design
        • Set CSS in Data Design
        • Set Input Value in Data Design
        • Get Input Value in Data Design
        • Get Toggle Switch State in Data Design
        • Set Toggle Switch State in Data Design
        • Set Input Feedback in Data Design
        • Enable/Disable Element in Data Design
        • Initialize Toggle Switch in Data Design
        • Event Action in Data Design
        • Collapsible Area Action in Data Design
        • Data Record Count
        • Data Record at Index
        • Data Record Loop
        • Data Record Info
        • Data Record Loop Index
        • Data Record ID
        • Data Table Name
        • Data Query Name
        • Data Read
        • Data Read Next
        • Data Read Previous
        • Data Lookup
        • Data Lookup with ID
        • Data Status
        • Data Add Record
        • Data Update Record with ID
        • Data Delete Record with ID
        • Data Input Popup
        • Lock/Unlock Form
        • Save Form with Data
        • Reset Form
        • Set Form Event Status
        • Set Form Event Status Message
        • Form Submit Complete
        • Set Field Input Value
        • Get Field Input Value
        • Form Data
        • Form in Edit Mode
        • Form Events
        • Execute Connection Command
        • Execute API Call
        • Connection Data
        • Connection Error
        • API Call Connection
        • Connection
        • Connection Command
        • Cloud Flow Invoke Hook
        • Cloud Flow : URL of Web Hook
        • HTTP Post
        • HTTP Get
        • HTTP Data
        • HTTP Error
        • Date
        • Custom Code
        • Date from Text
        • Get Object Property
      • Coding in Page Flow
      • Zingy API For Page Flow
      • References
        • Value Types
        • Popup Customization
        • Prerequisite for Dynamic Content block examples
        • Prerequisite for Data examples
    • Dynamic Content
    • Data
      • Database Tables
      • Database Queries
      • Data Tool
    • Cloud Flow
      • Cloud Flow Editor
      • Block Anatomy
      • Toolbox Blocks
        • Data Update Records
        • Data Delete Records
      • Coding in Cloud Flow
      • SDK/Library Integration
    • Media
    • Connections
      • Services
        • Stripe
        • Sendgrid
        • Twilio
        • API Call
        • API Key
Powered by GitBook
On this page
  1. 💻App Editor
  2. Page Flow
  3. Toolbox Blocks

Data Read

PreviousData Query NameNextData Read Next

Last updated 1 year ago

CtrlK

Block Information

Available in: Page Flow and Cloud Flow

Toolbox Category: Data - Read

Block Type: Regular

Data Read is a regular block that initiates a reading of records from a database table.

Data Read block

The block consists of the following (from top to bottom):

  • Table: Value Parameter that accepts a text value representing the name of the Database Table .

  • Query: Optional Value Parameter that accepts a text value representing the name of the Database Query . If this is blank, the database is read without any search criteria and sorting rules.

  • Dataset Name: Value Parameter that accepts a text value representing the name of the dataset. This can be any text value and can later be used to track the completion of the read.

  • Per Page: Value Parameter that accepts a numeric value containing the number of records to be read. This number is preserved for subsequent usage of the Data Read Next and Data Read Previous blocks when the same Dataset Name is used.

  • Input Criteria: Optional Value Parameter that accepts an object value. This is required only if a database query is selected for the Query parameter above. If the query contains search criteria parameters, the pre-attached Object block automatically gets populated.

NOTE:

  • This block initiates the database read, which will occur in the background. To track the status and to take an action upon completion of the read, use the Data Status block.

  • To access the records after a successful read, see Data Record Count, Data Record Loop, Data Record at Index blocks.


Usage Examples

NOTE: Please refer to the prerequisite information shown here before seeing the example.

The image below shows our first example.

Data Read Example 1

In the above example, we initiate a database read for the Customers table which we have discussed here. The Data Status block is used to track the status, and here we use the same Customers table and the dataset name of ds1. Upon success, we invoke the function Usage Example. We will look at some sample implementations for the Usage Example function.

(1) Show the number of records read using the Data Read Count block
(2) Use the Data Record Loop block to iterate over all the records

The above sample implementations are discussed in more detail here and here.

Now let's take a look at another example, this time we will use the NameMatch query that is defined for the Customers table and is discussed here.

Data Read Example 2

The optional Input Criteria parameter is attached to the Object block, which has one property Input-1 with a value of Smi. Remember that the NameMatch query accepts one input parameter and will list records where either the FirstName or the LastName fields contains the given input.

Also note the sample records contained in the Customers database table provided here.

The result for the above example can be seen in the browser's web console, and a sample is shown below:

[LOG(info) 08/30/2023 17:29:52.179] Name: Jane Smith
[LOG(info) 08/30/2023 17:29:52.181] Name: John Smith

Since the Input-1 parameter was set to the value Smi, the database read resulted in the records of Jane Smith and John Smith being shown.