# How do I set up a data source for my comments feature that automatically has the user id, name, email, photo and so on populated from my user data?

**URL:** <https://community.glideapps.com/t/how-do-i-set-up-a-data-source-for-my-comments-feature-that-automatically-has-the-user-id-name-email-photo-and-so-on-populated-from-my-user-data/64625>\
**Category:** Ask for Help\
**Created:** [August 2, 2023, 1:58pm UTC](https://community.glideapps.com/t/how-do-i-set-up-a-data-source-for-my-comments-feature-that-automatically-has-the-user-id-name-email-photo-and-so-on-populated-from-my-user-data/64625 "2023-08-02T13:58:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![SimonD](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@SimonD](https://community.glideapps.com/u/SimonD)\
**Post date:** [August 2, 2023, 1:58pm UTC](https://community.glideapps.com/t/how-do-i-set-up-a-data-source-for-my-comments-feature-that-automatically-has-the-user-id-name-email-photo-and-so-on-populated-from-my-user-data/64625/1 "2023-08-02T13:58:22Z")

</div>

Hi all,

How do I set up a data source for my comments feature that automatically has the user id, name, email, photo and so on populated from my user data?

Would I then just add a column to this data set to save the comments in?

Thanks Simon

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 2, 2023, 2:11pm UTC](https://community.glideapps.com/t/how-do-i-set-up-a-data-source-for-my-comments-feature-that-automatically-has-the-user-id-name-email-photo-and-so-on-populated-from-my-user-data/64625/2 "2023-08-02T14:11:20Z")

</div>

Assuming that your Comments are being added by a form, do the following:

- Add a column to your Comments table to hold either the users email address or RowID (either is okay)
- In your comments form pass either of the above (whichever you selected) as a special value
- Create a _single_ relation column in your Comments table that matches the user email/RowID with the same value in your User Profiles table
- Add one or more lookup columns to fetch the user name, avatar, etc via the relation.

---

<div class="post-metadata">

**Author:** ![SimonD](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@SimonD](https://community.glideapps.com/u/SimonD)\
**Post date:** [August 2, 2023, 2:23pm UTC](https://community.glideapps.com/t/how-do-i-set-up-a-data-source-for-my-comments-feature-that-automatically-has-the-user-id-name-email-photo-and-so-on-populated-from-my-user-data/64625/3 "2023-08-02T14:23:01Z")

</div>

Hi Darren,

When I add the comments element it does not generate a form…this is what I get to play with…

 ![Untitled design - 2023-08-02T222224.179](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/7/b7c22ed7369ab032df071256e342ea2a20592399.jpeg)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 2, 2023, 2:34pm UTC](https://community.glideapps.com/t/how-do-i-set-up-a-data-source-for-my-comments-feature-that-automatically-has-the-user-id-name-email-photo-and-so-on-populated-from-my-user-data/64625/4 "2023-08-02T14:34:42Z")

</div>

Yes, well you need to configure it.  
And you need to create a separate table to hold your comments.  
At the moment you have it configured to write to your Users table, which is almost certainly not what you want.

Rather than me giving you step by step instructions, why don’t you first have a go at setting it up by following the instructions in the docs:

> **[Comments](https://www.glideapps.com/docs/essentials/components/collection/comments)**
>
> Allow users to comment directly in your app.

If/when you get stuck, come back and show us where you got stuck and we’ll help you along.

---

<div class="post-metadata">

**Author:** ![SimonD](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@SimonD](https://community.glideapps.com/u/SimonD)\
**Post date:** [August 2, 2023, 3:28pm UTC](https://community.glideapps.com/t/how-do-i-set-up-a-data-source-for-my-comments-feature-that-automatically-has-the-user-id-name-email-photo-and-so-on-populated-from-my-user-data/64625/5 "2023-08-02T15:28:29Z")

</div>

Hi Darren,

I went through the instructions and they make sense, but I can’t seem to get the ‘current users’ details to map out the details needed for the chat display?

 ![I am trying to filter a couple of inline lists using a 'checkbox' as the filter but this does not seem to be working It is not filtering those that are checked or unchecked (1)](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/2/a289053e15f29139d73e9d22b3a98865c162ad67.jpeg)

Thanks, Simon

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 2, 2023, 4:05pm UTC](https://community.glideapps.com/t/how-do-i-set-up-a-data-source-for-my-comments-feature-that-automatically-has-the-user-id-name-email-photo-and-so-on-populated-from-my-user-data/64625/6 "2023-08-02T16:05:32Z")

</div>

I’m too lazy to type…

---

<div class="post-metadata">

**Author:** ![SimonD](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@SimonD](https://community.glideapps.com/u/SimonD)\
**Post date:** [August 2, 2023, 5:34pm UTC](https://community.glideapps.com/t/how-do-i-set-up-a-data-source-for-my-comments-feature-that-automatically-has-the-user-id-name-email-photo-and-so-on-populated-from-my-user-data/64625/7 "2023-08-02T17:34:49Z")

</div>

Darren,

Thanks so much for ‘holding my hand’ through this and taking the time, it is much appreciated and I have followed your video to the letter and it works! (but you knew that already! 🤣)

Another question…are users able to reply, comment or react to comments posted using this element?

Cheers, Simon

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 2, 2023, 11:47pm UTC](https://community.glideapps.com/t/how-do-i-set-up-a-data-source-for-my-comments-feature-that-automatically-has-the-user-id-name-email-photo-and-so-on-populated-from-my-user-data/64625/8 "2023-08-02T23:47:41Z")

</div>

Users will be able to add further comments, but not replying to a specific comment (if you hope for a tree of comments then that’s a no for this layout), or reacting.
