Data type field list: filtering results to add to the list


I’d like to filter a results list. Below

Screenshot 2023-07-11 at 15.36.09

My data type field list might already contain some of the results data. But I don’t want to add them in this case. I need to filter out the already existing results from the ones I want to add.

Sounds basic but I am struggling with it…


Hi @floripaolo :wave:

This is odd…
Did you already check if Bubble is really adding duplicate values to your list?
Because, by default, it doesn’t.


As you say it doesn’t happen always.

Before running the add WF:
Screenshot 2023-07-11 at 15.51.37

After running the WF:

Screenshot 2023-07-11 at 15.53.49

The first and second entry didn’t get changed. The third got duplicated.
It looks like it depends on the sequence of data retrieved?


It looks like the third item is not the same. Their lists of texts are different.
So I guess the data below is still in your database before running your workflow…


I guess I didn’t explain myself.

Yes I have that data already in the db. As I do in all 3 items! Check the first screenshot.
But only the third got duplicated. The single texts in the list are always the same (The sequence is different in the duplication). The list you are highlighting gets duplicated after the WF ran, jsut in a different order. In the first 2 items the texts didn’t get added again.

Otherwise I don’t understand what you mean…

And if you place a ONLY WHEN condition in this step:

Something like:

Only When Sendgrid Lists doesn't contain Resulta of Step 1

Those entries change over time so I would not get them each time I make the query.

But I realized what the problem might be:
Bubble sees the result (which CAN be a list) as a single item (even if there are 2, 3 or more different IDs in it). Therefore it works (it doesn’t duplicate), if there is only one ID, or when the sequence in the DB and the result is the same. But if there are more IDs (not in the same sequence as the one in my DB), the result gets added anyways.

Before running the WF. Both entries have 2 IDs in the same sequence.
Screenshot 2023-07-12 at 06.35.22

After running the WF

Screenshot 2023-07-12 at 06.37.09

Here below the screenshot of both entries (1 and 2)

after the WF ran. As you can see they get recorded as single entries.

First contact’s list IDs
Screenshot 2023-07-12 at 06.41.47

Second contact’s list IDs
Screenshot 2023-07-12 at 06.42.05

The field in your database is a list of text or a single text with codes splited by comma?
And from API, how do you receive the data?

Yes a list of text

As a text.



So, what I suggest you to do is to break the text you are receiving from API in a list of text (split it by commas) and then run an API Workflow in this list of text to add it, one by one, in your database only if it doen’t already exists.

I made a very simple example here. Take a look.

Editor is open. Click here.

1 Like

Hi Rafael

I found my rather stupid mistake. :roll_eyes: I used “add” instead of using “add list”. Thanks a lot for your help!!

1 Like