Need help on creating private chat

For your first question, do you have “Make row owner” set on your user profiles sheet?

Clever work-around, Lisa! Man, I hope Glide gets a native private chat feature at some point…
I do not have “make row owner” set in my user profile sheet.

1 Like

I believe Jeff’s answer is right. Glide won’t pull in the value of the username lookup if the relation is set to “multiple”. It sounds right that when you unchecked the box, it broke a few things.

I’ve unfortunately had to rebuild a few times when I set the relation to multiple and later find I need it to pull in just a single value :sweat_smile:

Once you recreate the lookups based on the single relation, you should be able to pull in the username.

2 Likes

Thank you Lisa that makes sense :smile: :clap:

1 Like

I don’t know why but I feel I have to make a little contribution to this thread again. I stayed away as much as I could from this thread knowing it was in safe hands, and it still is. But, please check concepts.glideapp.io. The solution to chat apps lies in concepts. It provides you with the building block/DNA of Glide chat apps. Master the concepts methodology and you can create not only 1on1 but also 1 on 20 user chat apps.

1 Like

@Wiz.Wazeer Man, if you keep plugging Concepts, I’m gonna have to get in there and do some updates. Some of that stuff is getting to be a year old. :wink:

2 Likes

:heart_eyes: :heart_eyes: :heart_eyes:Yes I know…but as far as chat section goes…I cannot for the life of me work out what new things you can add to it! :rofl:

1 Like

Okay may be images…but that’s very easy.

1 Like

Great tutorial Lisa ! Thanks a lot
I just find some difficulties to display the right infos in the inline list for the chats. How to display the Name of the user via the relation column?

Have you made any relations for the Sheets you are showing as the “Chat” tab?

I did, but I’m not sure I did it right :confused: Do you know where can I see an exemple in an existing template or tutorial?

If you can share some screenshots here we will try to help.

Here is my chat tab, I succeeded in getting the chat to work (via several relations to get the name and picture of the users), but how to fill the “last comment” column to be able to display it?

That’s a lifetime in Glide years.

1 Like

If you want to do it in the Sheets, make an arrayformula combine with VLOOKUP that looks up the latest comment matching with the unique topic ID.

If you want to do it in Glide’s data editor, copy the ‘App: Comments’ sheet to a new sheet that you can see in Glide (via a filter formula, ideally), then:

  • Make a relation to return the rollup that shows the latest comment timestamp of each chat topic/ID.

  • Make a template column joining that rollup and the chat topic/ID in the Chats sheet (containing topics), make the same template column in the Comments sheet (containing chats).

  • Make a relation - lookup of that template column in the Chats sheet to take back the latest Comments.

2 Likes

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