Does a list of things only contain unique entries?

As per the title, I can’t find anywhere in the docs that states whether a list of things will always contain only unique elements?

Eg. if I try and add ThingA1 in a list of ThingAs that already contains ThingA1 in a workflow, will the duplicate element be added to my list of ThingAs such that there are now two ThingA1s?

Hello @lachy welcome to the community

Short answer: no duplicates in a list of things

Thanks @cmarchan! Do you have a reference to the docs as well? Wondering where I’d look for these sorts of answers in future :slight_smile:

Nope.

Create a test page with RGs, the corresponding actions and see for yourself :smiley:

Haha ok, sounds good :smiley:

1 Like

While @cmarchan isn’t exactly wrong, a list of Things (which are, in most cases just the unique IDs of the things in question), can in fact contain duplicate values, it’s just that there’s no way – in vanilla Bubble – to create such a list. Plugins can, however, create lists of Things that contain duplicate values. (Upon operating on such lists with any of Bubble’s listwise operators, however, the duplicates will disappear.)

But plugins like List Shifter can, in fact, be used to create lists that contain duplicates.

3 Likes

As always @keith … you don’t stop to amaze! :smiley:

The almighty List Shifter … always capable of so much :+1:t2:

1 Like

With which operators?
If you have a combined list that contains duplicates and then, for instance, remove an item, the remaining list will still contain the duplicates.

Hey @Jett - yeah, the add/remove operators (:plus item, :plus list, :minus item, :minus list) won’t cause total deduplication (though of course :plus won’t add duplicates and :minus will remove all instances of the item in question), but the whole list operators like :merge and :intersect will.

1 Like