Need help: Notify users about new chat

Hi Guys,

I have a table where I am storing all the chats by users on my platform.

Each chat will have a message sender and message receiver

I will use query column to filter and display only few chats that are linked with Campaign manager.

For Campaign Manager Login

What I need help with?

**How can I get only list of Names of people who have sent new message **

It should not give me all message listing , but only say New chat from “Person Name”

EX: If User A has sent me 2 messages

User B has sent me 3 messages

User c has sent me 4 messages

and all messages are unread

My Query column should give me Just the users list.
Like : User A has a message
User b has a message
User C has a message

Currently I get list of all messages.

Can you guys help me or guide me how can I achieve this?

Thank you in advance for help.

Regards,
Dilip

Hi Guys,

Do I need to use make solution for this? Or can it be done via Glide tables and query column itself?

Appreciate any help from you guys.

Regards,
Dilip

You just need a column in your Chat table to indicate whether or not a message has been read. This could be a boolean column, or a timestamp, or whatever makes sense for your situation.

It may or may not need to be user specific. That depends on whether or not multiple users may see the same message (as in a group chat).

When a message is read, update the value in that column, and use it as a filter.

Hi @Darren_Murphy ,

thank you for replying.

I got this to work in the way you suggested.

but,

If User A has sent 3 messages

Message 1: Hi
Message 2: How are you?
Message 3 : Call me

User B has sent me 4 messages

Message 1: Hi
Message 2: How are you?
Message 3 : Call me
Message 4: Thank you for the call

and all 7 are un read My query column will output all 7 Messages

I just want it to check my query column and know the unique Name and just give me output as follows.

New Message from User A
New Message from User B

Is it possible to get this? On output of query column?

Thank you in advance for your help.

Regards,
Dilip

Take a lookup of the user name via the query, then run that through a unique elements column.
That will give you an array of all users that have sent messages. You could then take a joined list of that and feed it into a JavaScript column to produce the desired output, or use a helper table to expand the array.

Hi @Darren_Murphy ,

Thank you for the steps. I followed this and it worked I am now able to get what I wanted.

I have a different doubt now.

My Query column gives me the list of all messages.

Is there any way I can pick out messages which have unique comment owner name?

EX:

Query column output

Message 1: Hi → user 1
Message 2 : How are you? → user 1
Message 3 : Can I call you? → user 1
Message 4 : Hello —> user 2
Message 5 : Yes → User 3

All are unread

I want to get following

Message 1: Hi
Message 4 : Hello
Message 5 : Yes

Here I want \ messages but one for each unique user.

Could you guide me as to how can I achieve this?

Thank you in advance for your help.

Regards,
Dilip

Hi @Darren_Murphy ,

Thank you for clarifying my doubt.

However Wanted to know whether there is a way to get the result as mentioned above?

Thank you in advance.

Regards,
Dilip

Create the Query column in your Users table, then you can filter it by This row->User, sort it by date, and pick out the first one with a Single Value column.

Hi @Darren_Murphy ,

thank you for replying with a solution.

That wont really work because I will have messages from multiple users right ?

The solution you gave will give me One users latest comments in Single value column.

Please correct me if I am wrong.

Regards,
Dilip