Data Providers
Microsoft Azure SQL

List customers (SELECT)

7min


Scenario

Create a list of customers showing their names, email addresses, and locations. On the left is an avatar, and on the right is the country the customer resides in.

Resources

Jigx Code

The Azure SQL Docs solution is on GitHub.

List of customers
List of customers


How it works

This example selects a list of data from a customer table in an Azure SQL database and returns it to the Jigx solution on the device using the SQL data provider's function, where it is stored in the SQLite database. In the list

 the data is selected from the SQLite database using a SQL query in a data source which in turn is used by the list

to render the items.

Functions

The

 function is listed twice, once for executing a stored procedure and once for executing a query.

A store procedure-based version of get-customers.jigx

The following

 function uses a stored procedure to fetch a list of data from Azure SQL.

get-customers.jigx


A query-based version of get-customers.jigx

The following

 function uses a SQL query to fetch a list of data from Azure SQL.

get-customers.jigx




(screen)

  • Use a list type to configure a list of customers.
  • Since the data is already synced to the local Sqlite data provider, the
    
    s datasource is configured with a query to provide the data for use in the list.
  • Expressions are used to reference the exact data property required in each component.
listCustomers.jigx


index

Add the list of customers

 to the home screen with a widget size of 4x4 which automatically shows the list in the widget.

index.jigx