Delete a chat message

Please, give me an advice. I’m building chat and I’m having trouble deleting messages. How do I create a function for deleting a message or fibers? Thank you. I’m sorry, I’m a complete beginner.

Currently typing this on my phone so can’t check exact step to step methods.

But you should be able to achieve this by:

  • Going to the screen that has the message (chat message)

  • Then create a new button, lets call it “Delete Chat”

  • Then give that button an action. In the action section you should see a tab called “Delete”. It is usually around the create/update tabs.

  • Select the Delete tab and then choose what you would like it to delete. This will most likely be “Current Message” or “Current Chat”. (Depends on what you called the database)

Run and test the button. When you click the button it should delete the current chat message.

Let me know if you run into any trouble and I’ll check later when in front of a computer.

Good luck!

Thank you for answer. It’s really not that simple. If I create a button (delete function - Current Conversation or Logged In User) on the Home tab (conversation list), the user is also deleted.

If I create an Update database - Remove Current Conversation button, the message will be deleted, but the “Profile Picture” and “Full Name” communication will also be deleted to the other party. An empty desktop with a trash can icon remains.

It is a great pity that all videos on the Internet creating a chat do not solve this function. Without Delete Message, however, chat is unusable.

Thanks for replying. To help with this then I would really need to see how the database is all layed out and how it is all connected.

You mentioned that tutorials online don’t solve this problem with there chat messaging. Do one of these tutorials have the same database setup as you do? If one does could you share the link to it, would help a lot.

Sledoval jsem oficiální video Adalo. Krok za krokem. Všechno funguje dobře.

(od 3 minut)

Hi @radimone ,

Sorry for the late reply.

I have tested this method on the Adalo Web App template. Hopefully, it is the same setup you are using. To view this template all you need to do is create a new project, then go to the web app section and choose the “Chat” template.

I have found the problem and it is most likely the problem you are facing. Follow these steps:

  • Go to the “Start Conversation” screen. Then click on the custom list.
  • Once you are in the first list, go into the second list labeled “List 2”.
  • Once in that list scroll down to the bottom and click on the “Components” drop-down menu.
  • Now click into the “Group 21” component.
  • When you are in there you’ll see the red text “Sometimes Visible”. Click into it and change it to “Always Visible”.
  • Save and test.

It should now list all users even after the conversation or message has been deleted.

Why was this happening:

The reason this was happening is because the Sometimes filter checks to see if you are friends. If you have messaged them before they are in the friend section. If you are friends it does not show in the new conversation screen.

I’m assuming this was done because a delete function wasn’t integrated at the time, so there was no reason why the messaged person would leave the main Conversations screen.

Let me know how it goes.

Hi @radimone

Just wanted to check and see if that fixed your problem?

Thank you very much for your interest in my problem. Unfortunately, it doesn’t work again.

How I created it:

  • use Adalo Chat from the application menu
  • Created delete button next to “NEW” icon
  • Delete - Current Conversation action created
  • Start Conversation tab - group 20 set to always visible

How I tested:

  • login as Ben (from the attached database)
  • Message to Richard
  • logout Ben
  • login Richard
  • deleting a message from Ben
  • logout Richard
  • login Ben
  • message deleted by Richard not found at Ben

Hi @radimone

Sorry I think I must had misunderstood your original problem.

So your problem is that when one user deletes the conversation, it is also deleted on the other users account to?

Exactly. Something like SMS messages. I delete the message on my side, not the recipients.

I tried to solve it via the Update database, so I probably mystified you. I am sorry.

But advice on user visibility for chat is also useful. So thank you anyway! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.