execute-entity
Execute-entity can save, update, or delete data in a single row from a database, depending on the chosen method. Each datasource type (Dynamic / SQL / REST) will have a different syntax for updating, saving, and deleting data.
For the Dynamic datasource, values will be saved under the data option. For SQL/REST datasource, values will be saved under the Parameters option.
This action can't be used if you are using Static Data.
Configuration options
An execute-entity action can be used in multiple areas:
Under the action button
In action list
In onPress/onChange events (if the component you are setting up has these options)
In onRefresh/onFocus
The execute-entity has a go-back option, which is set to on by default. That means when you run execute-entity, it will automatically return you to the previous jig.
Offline remote data handling
Dealing with offline remote data is fundamental to ensuring data synchronization and consistency between the mobile app and the remote data source, allowing users to continue using the app and performing actions without interruption. Offline remote data handling explains how to configure solutions to deal with data when the device is offline using the queueOperations property available in execute-entities and provides examples and code samples.
Examples and code snippets
Execute-entity in action

In this example, execute entity is used in action with the create method. This example results in creating a new record with the First name, Last name, Email, and Phone number information. Execute entity is called by the press of the Save details button on the bottom.
Example: See the full example of execute-entity in GitHub.
Execute-entity in action list

By pressing the Save details button the execute-entity action will be followed by the go-to action.
Examples: See the full example of execute-entity in GitHub.
Execute-entity in onPress/onChange event

Execute-entity in onRefresh/onFocus

Deleting data using execute-entity
Here is an example of deleting different data using execute-entity. There are always 2 options for how you can delete a record:
Using SQL Select
Using JSONata function
In the first two examples, you can see the same situation where you are deleting all the records where the name equals Jane.
The third example shows how to delete the first 3 records from your datasource.
Last updated
Was this helpful?