Data Providers
Dynamic Data

Updating Dynamic Data

4min

The employee's details are updated using the provider's update method in this example. The same employee list (Reading Dynamic Data) is used to select the employee and then populate the employee form (Creating Dynamic Data) with the employee's existing details. Edit the required details and update the record in the table.

Datasources, jigs, component & actions

  1. default.jigx is the database where the table is defined.
  2. sqlite datasource calls the provider, using an SQL query to return the data.
  3. jig.list is the type of used to list the data in an expander component with an onContentPress action with parameters to transfer the selected employee's details to the form.
  4. form is the component used with intialValue properties to populate the employee data into the form fields.
  5. submit-form is the action that executes the update method of the provider with the recordId property configured to identify the record in the table that must be updated

Examples and code snippets

Update Dynamic Data record
Update Dynamic Data record


Use the employee list with component.expanders add the onContentPress action that will open the employee form, add parameters to transfer the employee details to the form.

list-employees.jigx
default.jigx
index.jigx


In the pre-populate Update Employee form add the action.submit-form using the provider with the update method to update the data record.

The record is updated intstantly and the new employee details are shown in the list

update-employee.jigx
index.jigx


Navigate to the solution's Data option in and view the updated employee table and record.

Updated Dynamic Data record
Updated Dynamic Data record