Delete chat app message

when user open that and send message ,old messages appear
is there any way to delete chat message from chat app

If the chat is made with MIT CloudDB or FIrebaseDB controls, whether you can 'delete' a chat message or not depends on how YOU coded the chat. If each chat message is a Tag; clear the Tag; If each chat is a List, provide code to remove certain chat 'messages' from the chat. You as a developer must provide the code to provide the functionality to delete from your app.

If you do not want 'old' messages to appear in the chat write code to delete them. How? I certainly do not know without viewing the logic you designed your chat with. You can write code to inhibit old chats if you want. Nothing requires your app starts a new session with 'old' data unless that is the way you coded it.

1 Like

I used text box to show it messages this is the code , there become two problems

Two problems? One problem is when you clear the Tag Chat (using the trash can Button) you do not also clear the Label that displays the chat. You could code Display to equal an empty text Block under your ClearTag Chat block provided the Label you display the List Chat in is global Display. I cannot tell if what you call Display is the Label you use to show your Chat List from your code.

When you clear the Chat Tag, you must also tell the app to clear the Label so that the 'discussion' is also removed from the Label on your Screen. You must also set the List Chat to create empty list, otherwise you will add the 'new' chat to the old chat if you beginning the new chat immediately without restarting the app.

Instructors recommend students change the default names of components to something meaningful (change Label1 to Display perhaps). When students change the component name, it makes it difficult for anyone to debug an app unless the meaningful name is meaningful. Instead of Display, call the Label labelDisplay so everyone, in addition to you, knows that the component is a Label.

This is your app, so you can name the components anything you want> I recommend leaving the default component name as it is if you you expect to get help debugging. I almost never change a component name but I never get confused.

thanks a lot for your help :smiley:
but how remove quotation marks in messages??

@Elham_Ali Use replace text block

it didn't work

Show your blocks

replace segment with a quote ( " ) not a comma ( ,)

1 Like

also is didn't work i uses these ways but didn't work

quote :slight_smile: should work.

You may also want to remove the brackets [ ] ; use this

1 Like

I like to use List Pickers instead of Labels to show my Lists, because you can Select items and then ask what to do with them, like to delete them from the List.

Your chat tag comes with a list as a value, because of the way you add messages to it.

If you don't like having to scrape off [""] from what you get when you stuff a list into a .Text field, run it through a JOIN WITH SEPARATOR '\n' block first.
That gives you a neat multi-line text version of the list.

1 Like

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