Link Search Menu Expand Document

Delete a Record using Datasource

Tip: You can use Manage Records to delete a Record without running the application.

For your users to delete Records in your application, you will need to add a Delete a Record Datasource.

  1. Navigate to the Screen that you want to add the Datasource.
  2. Press the Datasource button.
  3. Press the + Create datasource button.
  4. Select the Kodika Server tab.
  5. Select the Data Type of the Record that you want to delete.
  6. Select Delete a Data Type Name.
  7. Select the record to delete.
  8. Connect at least the parameters of the On Success response.
  9. Press Save.
  10. Close Datasource popup.
  11. Create a Start a Datasource Request Event Action and connect it to an Event.

Select the Record to delete

The first step to delete a Record is to select which Record you want your user to delete during execution. This Record could be either the same every time the Datasource is executed or change dynamically using a binded value.

Specific/Static Record

If you select a specific Record in this step, every time the datasource is executed, it will always delete the same Record, regardless of the current user or other parameters.
Tip: We suggest to NOT use the Specific/Static Record option, as it will delete the Record the first time the Datasource is executed and then will always return the When Wrong Filter Value response because the Record will be already deleted.

Binded Record value

You can bind the Record value for it to change dynamically during the execution.
For example, you can bind it to a Current User’s property, so each user deletes its own Records.

Request Parameters

Filter

Change the record that will be deleted.

Responses

Note: If any of the validations failed, the On Success response is not called, and only the respective failure response is called.

On Success

Called when the Record is deleted successfully.

Parameters:

  • Updated Record: The updated record.

On Error

Called when there is an unknown error that is not handled by the other responses.

Parameters:

  • Error: A text with an error message.

When Wrong Filter Value

Called when the Record that you have selected to delete, does not exist.

Parameters:

  • Error: A text with an error message.

When Offline

Called when the user has no Internet connection.

Parameters:

  • Error: A text with an error message.