Need help on creating private chat

Nice idea ! The sheets solution works yell, but how do I add it automatically when a new row is added?

That’s why I mentioned the arrayformula so it automatically calculates when a new row (of topic) is added.

I have written about the use of it here:

If you need help with creating the arrayformula, feel free to tell me.

Hello ThinhDinh,

I tried some formula, but I think this is way above my excel knowledge ! :frowning:

I try to get the content from column F, if the ID in B column is the latest one found by a LOOKUP

Capture

Any Idea? Thank you for your time !

I think you have the “Topics” sheet already right, and this is the Comments sheet.

A combination of VLOOKUP and SORT would do it. Assuming you store the topic/topic ID in column A of the “Topics” sheet, and in the Comments sheet the matching topic/topic ID is in column B.

=ARRAYFORMULA(IF(A2:A<>"",VLOOKUP(SORT('App: Comments'!B2:F,4,FALSE),5,FALSE),""))

Explanation: I sort the App: Comments sheet by column 4, which is the timestamp, in descending order. Then the VLOOKUP will return its first match, by design, so it will have the latest message back to your Topics sheet.

Thanks a lot !

I used this formula, it works well :

=SI(A2<>"",SIERREUR(RECHERCHEV(A2, SORT('App: Comments'!B:F,5,VRAI),5,FAUX),"Nouvelle Discussion"),"")

I’m not sure what ARRAYFORMULA would bring more ?

2 Likes

It will automatically calculate for new rows. I wrote about it here.

Perfect, seems to be working perfectly !

1 Like

First day here.
Thanks for the good work you are doing.
This topic is closed but if someone can help me I would appreciate it.
Do I need to do any relations for a chat app-private?

Yes between user 1 and 2
@Kairu watch the video it will help a lot

Thanks
Did you share any link

Actually, I should mention I am a complete newbie with glide, with intermediate excel knowledge

Welcome to the community

This is it

Thanks, I will watch this again and again

Not sure of the argument here

I have set a form where you can request to chat with a user, I have linked it to a ChatSheet as per @Lisa video, somehow the form does not update my ChatSheet, of course I have not done the relation if that affect

I have no idea how to set the message screen, like the one for Lisa, I see it is a detail screen. 1st 2 components are action text, what actions are they doing?

You may wonder, why I want to build an app where I seem to have no clue, well, this someone else project but he hired me to do the chat functionality

But I have grown-fond of what glide can do

I will definitely try my own project once I manage this

This is my chat request screen, I couldn’t attach it above, I am limited to one pic per message

Apologies to members for spamming

No worries Moses, we are all here to help.

Can you verify that when you submit the form it does not update your ChatSheet (It’s “Msg” in your sheet file right?). Does it not update any rows in the sheet at all, can you scroll down the sheet to check if it’s added at row 501 or 1001, and go in the Data Editor to check for them as well?

@ThinhDinh Thank you

It really did to some random rows I think

Remove all empty rows in the sheet and try adding another chat to see if the problem persists.

Thanks, it is now updating accordingly
FYI @ThinhDinh mentioned I needed to do some relation between user1 and user2, I am yet to do this

Have you set up a new tab to show chats for each user?

In my app, I name the 2 email columns “Email 1” and “Email 2”. It will then be shown in the data editor as an “Email” array column. I set row owner on that column, so only chats of each user will be showed to them.