Building Apps with Jigx
...
Data Providers
Dynamic Data

Using Dynamic Data

5min

Once you have created the tables as well as, columns and data records the data can be used in multiple places in a solution.

 can be:

  • Protected - add Row Level Security (RLS) through security policies and authorization. For more information, see Row Level Security, Data policies and Authorized users.
  • Created - create new records in tables, for example, adding new employees. For code examples and snippets, see Creating Dynamic Data.
  • Read - Read the data to populate a form, list, show a location and more. For code examples and snippets, see Reading Dynamic Data.
  • Updated -update existing records in tables, for example, updating an employee's address. For code examples and snippets, see Updating Dynamic Data.
  • Deleted - delete existing records in tables, for example, remove old contacts or out-of-stock products. For code examples and snippets, see Deleting Dynamic Data.

As a datasource

The provider is used in in the SQLite datasource either inside a single (locally) or under the datasources folder structure (global), allowing the data to be called once and reused throughout the solution in multiple s. Write SQLite queries to return the exact data you need to work with.

sqlite-datasource-dd


In components

Once you have created the datasource.sqlite with the provider as shown above, the data is referenced in components using Expressions, such as =@ctx.datasources.employee

YAML


In actions

Execution actions are designed to interact with specifically with data. The following actions can be used with the provider either to create, update, delete, or sync data.

Events actions execute after an event is performed by a user or device. This event can be configured to use the provider, for example, when refreshing a list by pulling down (onRefresh) use the action.sync-entities with the provider to refresh the data in the list. The following event actions are available.

  • onRefresh
  • onFocus
  • onPress
  • onLoad (only on index.jigx)
  • onChange
  • onDelete
  • onButtonPress (only on calendar jigs)

For the complete list and code examples of available actions, see actions.

Examples and code snippets

The following examples with code snippets are provided:



Updated 08 Aug 2024
Doc contributor
Did this page help you?
Yes
No