FREE OutSystems Workshops - Build an OutSystems App in 1 hour | ENROLL NOW

Tech Bites - Build a real time chat

< Back to Blog

Have you ever assumed how hard it seems to be to create a web chat app?

With OutSystems Reactive Apps building a chat, it’s fast and easy!

For our app, we need an entity called Message, containing the data about who sent a message, who’s the receiver, the message itself, and the date and time.

First, drag-and-drop a list widget. Assign it to the aggregate’s list.

Then, drag-and-drop the “Chat Message” pattern inside the list.

That pattern has placeholders for the data. Drag the user’s name and the text message inside those placeholders.

The time of the message is set on the widget’s properties. Set the time to the correspondent attribute.

One of the properties allows us to align the messages on the right if sent by the logged user. Set that property to “Get user id” equals “sent by” attribute value.

Let’s do something similar to the status, which can be “sent” or “received.” But in this case, let’s use the “if built-in function”: if the user sending the message is the same as the logged user, the message was sent. Otherwise, it was received. Thus, changing the icon below the message. 

With a simple input form that saves messages on the “Message Entity,” the user can now send messages.

Turn Up Academy

Apply to our Turn Up Boot Camp


Latest Articles

Tech Bites - How to use Screen templates

How to use Screen templates

Did you know that the OutSystems Platform has tens of screen templates to help you quickly put together your apps? Let me show you how you can use them.

Tech Bites
Tech Bites - Set timers to delete records

Set timers to delete records

In this tech bite, we will demonstrate how to set timers to delete records and use an online store as an example.

Tech Bites
Tech Bites - How to import data from an excel file

How to import data from an excel file

In this video, we’ll show you how to upload and store data from an excel file.

Tech Bites