Updating Dynamic Data

The employee's details are updated using the Dynamic Data 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 Dynamic Data table.

Datasources, jigs, components & actions

  1. default.jigx is the database where the Dynamic Data table is defined.

  2. sqlite datasource calls the Dynamic Data provider, using an SQL query to return the data.

  3. jig.list is the type of jig 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 initialValue properties to populate the employee data into the form fields.

  5. submit-form is the action that executes the update method of the Dynamic Dataprovider 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.

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

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

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

Updated Dynamic Data record
Updated Dynamic Data record

Last updated

Was this helpful?