Need help with "delete thing"

Hello everyone.

Faced such a simple task as deleting a thing from the database, but I can’t solve it in any way.

I have an icon that, when clicked, should remove the current user’s avatar.

The problem is that I do not know how to arrange this workflow, although it would seem that everything is simple.

When I tried

“When button is clicked ----> Delete thing (current user avatar)” Bubble offers the following options shown on the screen.

But it doesn’t let me just leave the entry “delete current user’s avatar” and it requires to continue recording the workflow using one of the options shown in the screenshot.

Screenshot_3

I hope I have explained my problem clearly. Please, help.

How should the workflow be built so that when the icon is clicked, a record is deleted from the database for the current user?

I searched for information, but everywhere it just says that you need to use “delete thing” under a certain trigger condition. But I did not find the details of building a workflow.

Hi @faxtrot117 :wave:

I suppose the User’s Avatar is an image, saved in your Bubble’s Database, am I right?

If so… you need to user other action:

And there, you can write “Current User’s Avatar”.

Yes you’re right. When I use “delete an uploaded file” it is removed from the file manager only, not from data base. And the user’s avatar continues to be displayed :frowning:

What you can do is to use another action just after the “Delete an uploaded file” to “Change a thing”. Then change the Current User’s Avatar to nothing. Leave it empty.

1 Like

Thanks a lot. It helped

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.