Why is not possible to use “ISN’T IN” for “unique id” value while it’s possible for other fields?
When I use a list i prefer to collect “unique id” values instead of other fields (that can be changed by users for example).
I think that this missing feature would be added.
Thanks for help.
I’m facing the same problem.
I did a turn around that I don’t like, but it’s solving the problem by now:
Let’s say I just want to list videos that the user has never saw.
I have 2 things: Videos and User_Videos
- I created a slug for each Video
- I saved the Video in the User_Videos as video
- I saved the Video Slug int the User as video_slug
- I do a Search for Videos where Slug isn’t in User_Videos video_slug
It’s not a good solution, but it’s helping me until they do the correct way.
I recall seeing one of the founders say in a post years back that UniqueID was handled differently by Bubble, which is why you can’t do an “is in” type of search. But regardless it’s a major pain. As a workaround you need to search a record based on some other field and ensure that field is unique. This may mean creating a text field and copying over the UniqueID into it, which feels messy but I don’t see a way around it.
In my case I’m running into this when trying to do a nested search of a joining table (which I’m building to try to avoid an advanced filter on a many-to-many search). If I have Items, and Tags, and an Item_Tag joining table, in my Item search constraints what I want to say in essence is… this Item is in search for Item_Tag’s Item. However there’s no such expression. Instead you have to pick a field and say… Item’s Field is in search for Item_Tag’s Item’s Field.
You can use “Unique ID isn’t in Do a search…'s unique ID” if you put that on a “:filter” → Advanced.
The “:filter” problem is that it takes longer to search, but if you don’t have that much Data, it may help you too
I feel like advanced filters are a band-aid – they work fine with small amounts of data, but as you grow and scale, it becomes a problem.
This is a good solution for one of my cases. Thanks for sharing.
It might help if you create a new field called
self_id (text)- and then populate it with the
thing’s unique_id after its creation. We use it pretty often.
Wow, I didn’t know this. Another way to get around it is to use the slug field. The added benefit is that it is guaranteed to be unique. But you have to set it.
As I know, the Bubble engine already takes care of id’s uniqueness when you create a new thing. So, you just take the
thing’s unique_id and set it as the
thing’s self_id (the same thing).
The slug can be changed, while the unique_id - not.
Oh, duh, Rico!!
Of course, you’re only copying the IDs so, yeah, it will be unique.
Count that previous comment as a loud ‘brain fart’.
The important thing is not to mess with the steps when you create several things in a workflow.
I mean, when you create
Thing 1 and
Thing 2, be sure that you set
Thing 1's self_id as
Thing 1's unique_id, not
Thing 1's self_id as
Thing 2's unique_id like when I accidentally did for a task…
Do you all know if this same issue applies to getting data via the API? I’ve tried to no avail to get my users by a list of their IDs using a constraints object
nm, i got it working by
_id w/ an
in constraint type in API.
My issue was an encoding one
Wow, every once in a while, it’s worth it to get to the bottom of the comments section to see an answer like this one. Thank you.
I typically use