I’d like to filter a results list. Below
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…
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:
After running the WF:
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:
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.
After running the WF
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
Second contact’s list IDs
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?
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.
I found my rather stupid mistake. I used “add” instead of using “add list”. Thanks a lot for your help!!