Dynamically Deleting Repeater Rows
In this tutorial, you'll learn how to dynamically delete rows from a repeater widget using the Delete Rows action.
Click here to download the completed RP file for this tutorial.
1. Widget Setup
Open a new RP file and open Page 1 on the canvas.
Drag a repeater widget onto the canvas, or create one from existing widgets on the canvas by selecting them, right-clicking, and choosing Create Repeater from the context menu.
In the Libraries pane, switch to the Icons library and enter
closeinto the search field at the top-left of the pane.
Drag the big "X" icon onto the canvas and place it to the right of the rectangle. Set its width and height to
2. Delete the Row When the X Is Clicked
With the "X" icon still selected, click New Interaction in the Interactions pane.
Select the Click or Tap event in the list that appears, and then select the Delete Rows action.
Select the repeater widget in the Target dropdown.
Leave the This radio button selected and click OK to save the action.
The Rule option deletes rows that meet a given filter rule. The Marked option deletes rows that were previously marked.
3. Preview the Interaction
Preview the page and click the "X" icons one by one to delete the repeater's rows.
Additional Information and Tips
Deleting Rows from Outside the Repeater
You can use the Delete Rows action from outside the repeater as well. When deleting rows from outside the repeater, you'll need to specify which rows should be deleted, either with a filter rule or by marking the rows you want to delete.
You can learn about these techniques in the Filtering Repeater Rows tutorial and the Marking Repeater Rows tutorial.