How do I add a delete button to delete one of my messages/clear all messages?

I cant figure out how to change this or add a way to delete the message.

You do not provide any context for your question....

Ah sorry, Im making a chatting app using CloudDB, and Im trying to figure out how to delete messages, As im rather new to coding. If you want I can show my code so far?

What method/components are you using to display your messages ?

image_2023-06-09_095040436

This is what I have so far, Im using a list to display my messages

image_2023-06-09_095130998

It appears you are using a textbox to display all your messages....

Deleting an item from a list is no big issue, selecting the message to be deleted in a textbox is more problematic.

Also, what if the originator of the message does not want their message deleted ?

Its more to prevent nasty words from being said

Oh, you are now using list elements to display your messages?

Im pretty sure its list, im not 100% sure

You could set up a "nasty words" list to test the message against before it is posted....just like this community - try it :wink:

Im not sure how to do that exactly, mind explaining a little?

If using listview to display your messages, you can use the afterPicking event (after selecting a list element on the listview) to offer an option to delete a message. You would need to download the entire chatlist from cloudDB, remove the item by index, then upload the entire chatlist back to the cloudDB tag

Make a list of nasty words
When a user submits a message, check the message content against you nasty words list
If the message contains any nasty words, alert the user to edit their message, otherwise allow the message to be submitted.

okay ill try it thx

A quick example

Oh wait, How do I download the list again?

image

It didnt work, I tried to do the same thing as you, but it didnt really seem to delete the message when i said it

Should be something like this:

image