How can I set up a delete button to delete specific rows I can choose in the data table? Creating a custom action and using the “Delete Row” action wont give me any more option besides that.
Also, is it possible to have the Delete button delete a specific row instead of multiple at least?
You could use the delete action via relations. You could use it with a Multiple relation to delete multiple rows or with a single relation to target a specific row
Gotcha, Ill see what I can do and try. Ill get back to you if any questions
Im still kind of new to relations, ive clicked some buttons and kind of got an idea of how they work, I just dont understand how a relation would allow me to delete rows from a delete button inside the app.
When you choose the delete action there should be a field ‘row’ or something like that. Change it from ‘this item’ to your relation.
The default setting for a delete action will be the current row. To target rows elsewhere relations are the way
I understand better now! Is it possible to have a choice in the app which allows me to select the rows with the user’s email in the email column and then have the relation action connected to the delete button?
For example, I have 3 columns:
- User’s Name
- User’s Email
- User’s description.
I want the relation to find all the rows with that user’s email and then have the Delete button delete those rows (and the name and descriptions that come along with that row).
Yes, you could do something like this:
- Start by creating a User Specific Column to hold the email address that you want to delete. This can be in any table, but I would probably create a new table with a single row, just for this purpose.
- Add a Choice component to a screen. Set the source of the choice as the email column in your Users table, and the target as the User Specific Column just created.
- Add a multiple relation column next to the user specific column that matches the value in the user specific column with the email column in the table you want to delete rows from.
- Add a button to your screen with an action attached that does a Delete Row via that multiple relation.