Selecting a List of Records
This example executes a SQL command to return a list of customers and display it in a list jig.
The Jigx function in the example below is listed twice, once for executing a stored procedure and once for executing a query.
Link to the full solution jig project on GitHub.
The example in this section selects a list of data from a table in an Azure SQL database and returns it to the Jigx solution on the device, where it is stored in the SQLite database. In the list jig the data is selected from the SQLite database using a SQL query in a data source which in turn is used by the list jig to render the items.
The code samples below include the list jig, the function to fetch the data from Azure SQL, and the index file to display the widget for the jig on the home hub.
The following Jigx function uses a stored procedure to fetch a list of data from Azure SQL.
The following Jigx function uses a sql query to fetch a list of data from Azure SQL.
The code for the list jig to display the list of customers is: