If your app uses a GET request to display an array of data in a dynamic Element, you can allow the user to select an item and run another request to edit or delete their chosen array entry.
- In the page with a GET request returning an array and displaying it in a dynamic Elementhelp (the Data Source should be bound to the dynamic Element), add the request you need for editing or deleting a particular item.
- Your edit or delete endpoint should accept a parameter specifying the item to update, typically this will be an ID, a unique identifier. Bind the parameter to the relevant field from the array being displayed, via the Data Source container. This will pass the ID for the selected item when the user interacts with the dynamic Element.
- Add any processing you need when the request response is received into the app, in the Responses or Events.
- Run the edit or delete request from the context of the selected item, for example the Tapped Event of a Button inside the Table Cell displaying the data item.
- Carry out any Actions you need to update the UI when the item is edited or deleted, for example removing the Table Cell when deleting.
Any Actions added to Events on Elements in (or on) the dynamic child Elementhelp can access the fields from the array item being loaded in each case, so if you have a unique identifier in the array entries, you can pass it into another request that identifies and updates the item. You can see a complete example of the workflow used for deleting an array item in the Checklist Example App.