Create 1 #mention topic per word

I’m trying to create a social media style topic system, so that I can filter all publications on that subject when the user clicks on #topic.

However, I’m having problems because with each new publication, if the user repeats the same word #topic, a new one is created in the database.

This way, when the system suggests the #, it repeats several.

Is there any way to limit each word to one unit, so that if there is already one in the system, another one is not created?

Below are images of how I’m doing it.mile:


2
3
4

Hi @execsy.mp :wave:

Try to insert the command :unique items in the end of your expression.

1 Like

Worked, but only when the user entered 1 #topic.

When you enter more, it confirms as something new with more items.

What am I missing here?


5

Why is hashtag a list of texts? It looks like you want only 1 hashtag for each topic?

In your second post for example, how does it supposed to look like? mention2, and mention1 should not be there simply? Because they were already in the list?

If the new one should have been mention4 and mention5 would that be fine? What would happen if another person enters mention4 in a single post again in that case?

I need it to work like a post on any social network.

In a post, a user can enter a list of # topics.

Example:
Post User: Today is a beautiful day to develop. #development #bubble #study #apply #repeat

My goal is that when a user enters the #, it saves all items in the post except those that are already saved in the database.

As for the post mention2, mention1, it was created when I tried to create the post with the hashtags, to test, they are not working, so I saved it like this, and the result in the automatic search in the new post field, both appear as a single item, that is the problem.

@execsy.mp I agree with @hergin - if I’m understanding this correctly:

  • the Hashtag field should be a simple text, not a list
  • you create a new Topic for each #text in a post, based on a cleaner conditional - it could look something like Search for topics:first item is empty, with the constraint hashtag = #text
  • you add a field list of Topics in your Post data type
2 Likes

Thank you very much, this modification has certainly improved a lot.

This way I managed to make it possible to create just 1 individual # for each topic.

3

The only thing left to do is make it impossible to create more than one # in the same field in the database.

Because when the user inserts several # in the same post, he understands it as if that set were a new #.

Thank you for your time and shared knowledge

@execsy.mp you would need to extract each #hashtag from your multiline input, and create a new Assuntos for each one that does not match an already existing Assuntos for the same #hashtag.

You then need to combine the list of newly created Assuntos + already existing Assuntos in that multiline input, and add them to your list of Assuntos in the ADSPostagens record.

1 Like

Without a doubt, this is the most difficult time I’ve had to create something on the bubble.

I tested several different commands with countless modifications, but I can’t get it out of place.

Following your answer, the closest I got was this command, which didn’t work.

What am I missing?

Thank you for your patience in helping me

@execsy.mp what plugin are you using to extract the #hashtags?

Plugin Tagger
image

@execsy.mp I think you may be overcomplicating things a bit - or maybe I didn’t understand your use-case.

A demo is worth a thousand words, so here it is: Bubble | No-code apps
And the editor: tags-execsy.mp | Bubble Editor

Let me know if that helps

1 Like

This is incredible, I failed to observe the creation of the command in the Backend Workflow, I wasn’t using it.

If you could keep this editor for today while I use it for study and application, I would greatly appreciate it.

Thank you for your time and expertise, it helped me a lot.

1 Like

@execsy.mp no problem - glad I could help. Yes I’ll leave it up for a couple of days

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.