# Building Adalo database for Hashtags

**URL:** https://forum.adalo.com/t/building-adalo-database-for-hashtags/2121
**Category:** Get Help
**Created:** [June 24, 2020, 3:58am UTC](https://forum.adalo.com/t/building-adalo-database-for-hashtags/2121 "2020-06-24T03:58:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tdhi](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@tdhi](https://forum.adalo.com/u/tdhi)
#### Post date: [June 24, 2020, 3:58am UTC](https://forum.adalo.com/t/building-adalo-database-for-hashtags/2121/1 "2020-06-24T03:58:22Z")

</div>

Hi all, I’m having trouble creating/updating hashtags on my users’ posts. Here’s how my database looks:

Collections: Users, Posts, Companies, Hashtags

Users \<–\> Posts is many to 1. Users can have many Posts, a Post belongs to 1 User.  
Posts \<–\> Companies is 1 to many. A Post belongs to 1 Company, a Company can have many Posts.  
Posts \<–\> Hashtags is many to many.  
Companies \<–\> Hashtags is many to many.

I need to:

1. Create New Hashtags if they don’t already exist. (I’m Creating New Hashtag as an second action from the Create New Post form)
2. Count the number of Total Posts with a specific Hashtag. (Across all Companies)
3. Count the number of Company-Specific Posts with a specific Hashtag.

Currently, on the screen with my list of Hashtags, I’m seeing repeats, and my counts are off. And, the Create New Hashtag action isn’t working. Wondering, should I create a custom form instead of using the Create New Post form? I’ve also tried the blank screen trick which Creates/Updates Hashtags.

thanks in advance for your help Adalo-ers!  
-tushar

---

<div class="post-metadata">

### Author: ![Ben](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/ben/32/9_2.png) [@Ben](https://forum.adalo.com/u/Ben)
#### Post date: [June 24, 2020, 9:22pm UTC](https://forum.adalo.com/t/building-adalo-database-for-hashtags/2121/2 "2020-06-24T21:22:21Z")

</div>

Hi @tdhi!

Your database structure sounds correct. Could you share a screen recording of how the repeats are being created as well as the counts being off?

---

<div class="post-metadata">

### Author: ![tdhi](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@tdhi](https://forum.adalo.com/u/tdhi)
#### Post date: [June 26, 2020, 5:30pm UTC](https://forum.adalo.com/t/building-adalo-database-for-hashtags/2121/3 "2020-06-26T17:30:58Z")

</div>

@Ben thanks! Will do…trying to figure it out on my own first 🙂

---

<div class="post-metadata">

### Author: ![Elgi](https://avatars.discourse-cdn.com/v4/letter/e/e5b9ba/32.png) [@Elgi](https://forum.adalo.com/u/Elgi)
#### Post date: [November 30, 2020, 5:44pm UTC](https://forum.adalo.com/t/building-adalo-database-for-hashtags/2121/4 "2020-11-30T17:44:45Z")

</div>

@tdhi hi! Are your hashtags searchable? I mean can a User click on one of them (if they are all mentioned in one field) and see the posts belonging to that particular hashtag the way it works in instagram? I would like to implement the same feature as instagram has in my app but am not sure if it is possible to do in Adalo… thanks!
